Function Namespace AjaxSolr
A unique namespace for the AJAX Solr library.
Defined in: Core.js.
Constructor Attributes | Constructor Name and Description |
---|---|
AjaxSolr()
|
Field Attributes | Field Name and Description |
---|---|
<static> |
AjaxSolr.AutocompleteTermWidget
A term autocomplete search box, using jQueryUI.autocomplete.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
AjaxSolr.equals(foo, bar)
|
<static> |
AjaxSolr.extend(child)
|
<static> |
AjaxSolr.inArray(value, array)
|
<static> |
AjaxSolr.isArray(obj)
Can't use toString.call(obj) === "[object Array]", as it may return
"[xpconnect wrapped native prototype]", which is undesirable.
|
<static> |
AjaxSolr.isRegExp(obj)
|
<static> |
AjaxSolr.isString(obj)
|
Field Detail
<static>
AjaxSolr.AutocompleteTermWidget
A term autocomplete search box, using jQueryUI.autocomplete. This
implementation uses Solr's facet.prefix technique. This technique benefits
from honoring the filter query state and by being able to put words prior to
the last one the user is typing into a filter query as well to get even more
relevant completion suggestions.
Index instructions:
1. Put a facet warming query into Solr's "firstSearcher" in solrconfig.xml,
for the target field.
2. Use appropriate text analysis to include a tokenizer (not keyword) and do
not do stemming or else you will see stems suggested. A 'light'
stemmer may produce acceptable stems.
3. If you are auto-completing in a search box that would normally be using
the dismax query parser AND your qf parameter references more than one field,
then you might want to use a catch-all search field to autocomplete on.
For large indexes, another implementation approach like the Suggester feature
or TermsComponent might be better than a faceting approach.
Other types of autocomplete (a.k.a. suggest) are "search-results",
"query-log", and "facet-value". This widget does term autocompletion.
Defined in: AutocompleteTermWidget.js.
Author: David Smiley.
Defined in: AutocompleteTermWidget.js.
Author: David Smiley
Method Detail
<static>
{Boolean}
AjaxSolr.equals(foo, bar)
- Parameters:
- foo
- A value.
- bar
- A value.
- Returns:
- {Boolean} Whether the two given values are equal.
<static>
AjaxSolr.extend(child)
- Parameters:
- child
- See:
- https://github.com/documentcloud/underscore/blob/7342e289aa9d91c5aacfb3662ea56e7a6d081200/underscore.js#L789
<static>
{Boolean}
AjaxSolr.inArray(value, array)
- Parameters:
- value
- A value.
- array
- An array.
- Returns:
- {Boolean} Whether value exists in the array.
<static>
AjaxSolr.isArray(obj)
Can't use toString.call(obj) === "[object Array]", as it may return
"[xpconnect wrapped native prototype]", which is undesirable.
- Parameters:
- obj
- See:
- http://thinkweb2.com/projects/prototype/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
- https://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js
<static>
{Boolean}
AjaxSolr.isRegExp(obj)
- Parameters:
- obj
- Any object.
- Returns:
- {Boolean} Whether the object is a RegExp object.
<static>
{Boolean}
AjaxSolr.isString(obj)
- Parameters:
- obj
- Any object.
- Returns:
- {Boolean} Whether the object is a String object.