manager.js | |
bbop. | Generic BBOP manager for dealing with gross GOlr configuration and management. |
Functions | |
manager | Contructor for the GOlr query manager |
debug | Turn on or off the verbose messages. |
lite | Limit the returns fields (the parameter “fl”) to the ones defined in the set of fields defined in results, label fields if available (i.e. |
get_facet_limit | Get the limit for a specified facet or the global limit. |
set_facet_limit | Change the number of facet values returned per call. |
set_default_facet_limit | Permanently change the default number of facet values returned per call. |
reset_facet_limit | Either reset the global limit to the original (likely 25) and/or remove the specified filter. |
get_results_count | Get the current number of results that will be returned. |
set_results_count | Change the number of result documents returned per call. |
reset_results_count | Reset the number of documents to their original setting, likely 10. |
plist_to_property_hash | Turn a plist to a hash containing the different properties that can be defined for a query filter. |
add_query_filter_as_string | Setter for query filters (‘fq’). |
add_query_filter | Setter for query filters (‘fq’). |
remove_query_filter | Remover for query filters (‘fq’), is a plist is specified, it will only remove if all of the listed criteria are met. |
reset_query_filters | Reset the query filters (‘fq’); but leave sticky filters alone. |
get_query_filter_properties | Get a hash representing a query filter (‘fq’). |
get_query_filters | Get a list of hashes representing the query filters (‘fq’). |
get_sticky_query_filters | Get a list of hashes representing the current stucky query filters (‘fq’). |
filter_list_to_assemble_hash | Get all of our query filter variables and try and make something of them that <get_assemble> can understand. |
sensible_query_p | Simply ask the manager if a free text query (‘q’) makes sense at this point. |
last_packet_sent | It is up to the UI to do something interesting with this number. |
clear | Clear all non-sticky query parameters to get back to a more “original” state. |
reset | Manually trigger the “reset” chain of events. |
search | Trigger the “search” chain of events. |
page | Re-trigger the “search” chain of events, but with the variables set for a different section of the results. |
page_first | Currently a convenience alias for search. |
page_previous | This is a wrapper for page and should be preferred over a direct call to page. |
page_next | This is a wrapper for page and should be preferred over a direct call to page. |
page_last | Trigger search on last page parameters. |
get_page_rows | Return the number of rows the manager is currently set to. |
get_page_start | Return the rows offset the manager is currently set to. |
add_query_field | Add a new query field to the query. |
query_field_set | Bulk getter/setter for the query fields--the fields that are searched (and by what weight) when using a query (‘q’ or set_query(), i.e. |
facets | Bulk getter/setter for facets (technically ‘facet.field’). |
set_default_query | Setter for the default query for the query variable (‘q’). |
reset_default_query | Reset the default query back to “:”. |
set_query | Setter for the query variable (‘q’). |
set_comfy_query | If the input is all alphanum or space, the input is tokenized. |
set_id | A limited setter, removing whatever else is on query. |
set_ids | Like set_id, a limited setter. |
set_targets | Like a more generalized version of set_ids, a limited. |
get_query | Getter for the query variable (‘q’). |
get_default_query | Getter for what the query variable ‘q’ will be set to on a reset_query. |
get_fundamental_query | Getter for what the query variable ‘q’ will be set to on a reset_default_query. |
get_query | Getter for the query variable (‘q’). |
reset_query | Remove/reset the query variable (‘q’); this set it back to the default query. |
set_extra | Setter for the internal string variable to be appended to the end of a query. |
get_extra | Getter for the internal string variable to be appended to the end of a query. |
remove_extra | Remove/reset the extra bit. |
set | Set an internal variable for the query. |
get | Get an internal variable for the query. |
unset | Unset (remove) an internal variable for the query. |
include_highlighting | Turn hilighting on or off (with true or false). |
set_personality | While we are always contacting the same Solr instance, we sometimes want to have different weights, facets, etc. |
get_personality | Returns the current personality, null if none. |
get_query_url | Get the current invariant state of the manager returned as a encoded URL string (using encodeURI()). |
push_excursion | Save the current state of the manager--data and sticky filter information--onto an internal stack. |
pop_excursion | Return to a previously pushed state. |
get_download_url | Get the current invariant state of the manager returned as a URL string. |
get_filter_query_string | Get the current state of the manager, as defined by the current gross filter set--query, sticky filters, and standard filters-- returned as a URL query string (sans the ‘?’ |
get_state_url | Get the current invariant state of the manager, plus the current personality as a parameter, returned as a URL string. |
load_url | Makes a a best attempt to recover the state of a manager from the clues left in a data url. |
add_to_batch | “Save” the current manager state to run later in serial batch mode. |
batch_urls | Return a pointer to the current batch urls. |
next_batch_url | Return the next data to be processed, removing it from the batch queue in the process. |
reset_batch | Clear the currently queued data batch. |
to_string | Output writer for this object/class. |
update | The user code to select the type of update (and thus the type of callbacks to be called on data return). |
Generic BBOP manager for dealing with gross GOlr configuration and management. Remember, this is actually a “subclass” of bbop.registry. The defined events for this registry are: “reset”, “search”, and “error”.
reset | functions for initializing and resetting |
search | functions for receiving standard search results |
error | functions to call when something goes very wrong |
Both bbop.golr.response (or clean error data) and the manager itself (this as anchor) should be passed to the callbacks.
TODO/BUG: set_query and set_default_query should both take strings or bbop.logic as arguments. Those, as well as get_query and get_query should only return bbop.logic.
Functions | |
manager | Contructor for the GOlr query manager |
debug | Turn on or off the verbose messages. |
lite | Limit the returns fields (the parameter “fl”) to the ones defined in the set of fields defined in results, label fields if available (i.e. |
get_facet_limit | Get the limit for a specified facet or the global limit. |
set_facet_limit | Change the number of facet values returned per call. |
set_default_facet_limit | Permanently change the default number of facet values returned per call. |
reset_facet_limit | Either reset the global limit to the original (likely 25) and/or remove the specified filter. |
get_results_count | Get the current number of results that will be returned. |
set_results_count | Change the number of result documents returned per call. |
reset_results_count | Reset the number of documents to their original setting, likely 10. |
plist_to_property_hash | Turn a plist to a hash containing the different properties that can be defined for a query filter. |
add_query_filter_as_string | Setter for query filters (‘fq’). |
add_query_filter | Setter for query filters (‘fq’). |
remove_query_filter | Remover for query filters (‘fq’), is a plist is specified, it will only remove if all of the listed criteria are met. |
reset_query_filters | Reset the query filters (‘fq’); but leave sticky filters alone. |
get_query_filter_properties | Get a hash representing a query filter (‘fq’). |
get_query_filters | Get a list of hashes representing the query filters (‘fq’). |
get_sticky_query_filters | Get a list of hashes representing the current stucky query filters (‘fq’). |
filter_list_to_assemble_hash | Get all of our query filter variables and try and make something of them that <get_assemble> can understand. |
sensible_query_p | Simply ask the manager if a free text query (‘q’) makes sense at this point. |
last_packet_sent | It is up to the UI to do something interesting with this number. |
clear | Clear all non-sticky query parameters to get back to a more “original” state. |
reset | Manually trigger the “reset” chain of events. |
search | Trigger the “search” chain of events. |
page | Re-trigger the “search” chain of events, but with the variables set for a different section of the results. |
page_first | Currently a convenience alias for search. |
page_previous | This is a wrapper for page and should be preferred over a direct call to page. |
page_next | This is a wrapper for page and should be preferred over a direct call to page. |
page_last | Trigger search on last page parameters. |
get_page_rows | Return the number of rows the manager is currently set to. |
get_page_start | Return the rows offset the manager is currently set to. |
add_query_field | Add a new query field to the query. |
query_field_set | Bulk getter/setter for the query fields--the fields that are searched (and by what weight) when using a query (‘q’ or set_query(), i.e. |
facets | Bulk getter/setter for facets (technically ‘facet.field’). |
set_default_query | Setter for the default query for the query variable (‘q’). |
reset_default_query | Reset the default query back to “:”. |
set_query | Setter for the query variable (‘q’). |
set_comfy_query | If the input is all alphanum or space, the input is tokenized. |
set_id | A limited setter, removing whatever else is on query. |
set_ids | Like set_id, a limited setter. |
set_targets | Like a more generalized version of set_ids, a limited. |
get_query | Getter for the query variable (‘q’). |
get_default_query | Getter for what the query variable ‘q’ will be set to on a reset_query. |
get_fundamental_query | Getter for what the query variable ‘q’ will be set to on a reset_default_query. |
get_query | Getter for the query variable (‘q’). |
reset_query | Remove/reset the query variable (‘q’); this set it back to the default query. |
set_extra | Setter for the internal string variable to be appended to the end of a query. |
get_extra | Getter for the internal string variable to be appended to the end of a query. |
remove_extra | Remove/reset the extra bit. |
set | Set an internal variable for the query. |
get | Get an internal variable for the query. |
unset | Unset (remove) an internal variable for the query. |
include_highlighting | Turn hilighting on or off (with true or false). |
set_personality | While we are always contacting the same Solr instance, we sometimes want to have different weights, facets, etc. |
get_personality | Returns the current personality, null if none. |
get_query_url | Get the current invariant state of the manager returned as a encoded URL string (using encodeURI()). |
push_excursion | Save the current state of the manager--data and sticky filter information--onto an internal stack. |
pop_excursion | Return to a previously pushed state. |
get_download_url | Get the current invariant state of the manager returned as a URL string. |
get_filter_query_string | Get the current state of the manager, as defined by the current gross filter set--query, sticky filters, and standard filters-- returned as a URL query string (sans the ‘?’ |
get_state_url | Get the current invariant state of the manager, plus the current personality as a parameter, returned as a URL string. |
load_url | Makes a a best attempt to recover the state of a manager from the clues left in a data url. |
add_to_batch | “Save” the current manager state to run later in serial batch mode. |
batch_urls | Return a pointer to the current batch urls. |
next_batch_url | Return the next data to be processed, removing it from the batch queue in the process. |
reset_batch | Clear the currently queued data batch. |
to_string | Output writer for this object/class. |
update | The user code to select the type of update (and thus the type of callbacks to be called on data return). |
bbop.golr.manager = function ( golr_loc, golr_conf_obj )
Contructor for the GOlr query manager
golr_loc | string url to GOlr server; |
golr_conf_obj | a bbop.golr.conf object |
golr manager object
this.debug = function( p )
Turn on or off the verbose messages. Uses bbop.logger, so they should come out everywhere.
p | [optional] true or false for debugging |
boolean; the current state of debugging
this.lite = function( use_lite_p )
Limit the returns fields (the parameter “fl”) to the ones defined in the set of fields defined in results, label fields if available (i.e. “_label”, “_map” when “_label” is multi=valued), and “score” and “id”.
The default is “false”.
use_lite_p | [optional] true or false, none just returns current |
boolean; the current state of lite-ness
this.set_facet_limit = function( arg1, arg2 )
Change the number of facet values returned per call. The default is likely 25.
Just as in Solr, a -1 argument is how to indicate unlimted facet returns.
This setting does not survive things like <resets_facet_limit>.
arg1 | (integer) set the global limit |
arg1 | (string) the name of the field to check |
arg2 | (integer) set the limit for this field |
boolean on whether something was set
this.set_default_facet_limit = function( lim )
Permanently change the default number of facet values returned per call. The default’s default is likely 25.
Just as in Solr, a -1 argument is how to indicate unlimted facet returns.
lim | (integer) set the global default limit |
old default
this.reset_facet_limit = function( field )
Either reset the global limit to the original (likely 25) and/or remove the specified filter. Sets everything back to the original values or whatever was set by set_default_facet_limit.
field | [optional] remove limit for a field; otherwise all and global |
boolean on whether something was reset
this.plist_to_property_hash = function( plist )
Turn a plist to a hash containing the different properties that can be defined for a query filter. Possible values are: ‘+’ (positive filter), ‘-’ (negative filter), ‘*’ (sticky filter), ‘$’ (transient). If mutually exclusive properties are defined (e.g. both ‘+’ and ‘-’), the last one will be used. Or, since that is a call to silliness, let’s say the behavior is undefined.
plist | [optional] a list of properties to apply to the filter |
A hash version of the plist; otherwise, the default property hash
this.remove_query_filter = function( filter, value, plist )
Remover for query filters (‘fq’), is a plist is specified, it will only remove if all of the listed criteria are met.
filter | filter (type) string |
value | filter value string (TODO: or defined logic hash) |
plist | [optional] list of properties of the filter |
boolean (on success)
this.get_query_filters = function()
Get a list of hashes representing the query filters (‘fq’). The return lists look like:
[{'filter': A, 'value': B, 'negative_p': C, 'sticky_p': D}, ...]
Where A and B are strings and C and D are booleans.
n/a
A list of the current query filter hashs.
this.get_sticky_query_filters = function()
Get a list of hashes representing the current stucky query filters (‘fq’). See get_query_filters for a specification of what the return type looks like.
n/a
A list of the current sticky query filter hashs.
this.filter_list_to_assemble_hash = function( flist )
Get all of our query filter variables and try and make something of them that <get_assemble> can understand.
Sticky doesn’t matter here, but negativity does. However, we can be pretty naive since the hashing should have already taken out mutually exclusive dupes.
The argument is a list of query filter properties, as returned by get_query_filters and get_sticky_query_filters.
flist | a list of query filter properties (see above) |
hash of filter names to value lists
this.sensible_query_p = function( qfs )
Simply ask the manager if a free text query (‘q’) makes sense at this point.
This currently means that the query text (‘q’) is three (3) or longer and that query fields (‘qf’) are defined.
This is an overridable opinion of the manager.
n/a
boolean
this.last_packet_sent = function()
It is up to the UI to do something interesting with this number.
Also remember that this number only rises through calls to update or one of its wrappers. Calls to get_query_url and the like will not affect this number.
n/a
integer
this.clear = function()
Clear all non-sticky query parameters to get back to a more “original” state.
Not to be confused with reset.
n/a
n/a
this.search = function()
Trigger the “search” chain of events. Takes a field-keyed hash of bbop.logics as an argument.
This is a curried wrapper for update and should be preferred over a direct call to update.
n/a
the query url (with the jQuery callback specific parameters)
this.page = function( rows, start )
Re-trigger the “search” chain of events, but with the variables set for a different section of the results.
Note that this operates independently of any impossibilites in the results--just how such paging would look and triggering. Ths UI should handle impossibilities and the like.
This is a wrapper for update and should be preferred over a direct call to update.
rows | the number of rows to return |
start | the offset of the rows to return |
the query url (with the jQuery callback specific parameters)
this.page_last = function( total_document_count )
Trigger search on last page parameters.
Since the manager has no idea about what is actually being returned, the real world number of total documents needs to be added as an argument.
This is a wrapper for page and should be preferred over a direct call to page.
total_document_count | integer for the total number of docs found |
the query url (with the jQuery callback specific parameters)
this.add_query_field = function( qf, boost )
Add a new query field to the query.
This does not go through and expand into searchable fields, for that see: query_field_set.
qf | the query field to add |
boost | [optional] defaults to 1.0 |
true or false on whether or not it is a new field
this.query_field_set = function( qfs )
Bulk getter/setter for the query fields--the fields that are searched (and by what weight) when using a query (‘q’ or set_query(), i.e. the ‘qf’ field).
This will always use searchable fields if possible, automatically replacing the non-searchable versions (I can’t think of any reason to use non-searchable versions unless you want your searches to not work) if a personality is set. If no personality is set, it will just use the arguments as-is.
The argument replaces the current set.
{‘field01’: value01, ...}
qfs | [optional] query fields to set |
the current query_fields array (e.g. [“field01^value01”, ...])
this.set_default_query = function( new_default_query )
Setter for the default query for the query variable (‘q’).
Call reset_query if you want to affect query immediately.
new_default_query | new default query string (or TODO: bbop.logic) |
the current setting of default query for (‘q’)
this.reset_default_query = function()
Reset the default query back to “:”.
Call reset_query if you want to affect query immediately.
n/a
the current setting of default query (‘q’)
this.set_query = function( new_query )
Setter for the query variable (‘q’).
new_query | new value for the query string (or TODO: bbop.logic) |
the current setting of query (‘q’)
this.set_comfy_query = function( new_query )
If the input is all alphanum or space, the input is tokenized. If there is one token, if it is at least three characters, gets a wildcard ‘*’; if there are more tokens, the last one gets a wild card.
This might be a more comfortable way to search for most naive (non-power user) interfaces.
new_query | new value for the query string (or TODO: bbop.logic) |
the current setting of query (‘q’)
this.set_id = function( new_id )
A limited setter, removing whatever else is on query. This is for when you want to lock into one (unique) document by id (essentially ‘q=id:”foo”’). All other query operations behave as they should around it.
new_id | string id |
the current setting of query (‘q’)
this.set_ids = function( id_list )
Like set_id, a limited setter. It removes whatever else is on query and replaces it with something like:
gm.set_ids(['GO:1', 'GO:2'])
This is for when you want to lock into a set of documents by id. All other query operations behave as they should around it.
id_list | a list of ids to search for |
the current setting of query (‘q’)
this.set_targets = function( id_list, field_list )
Like a more generalized version of set_ids, a limited. It removes whatever else is on query and replaces it with something like:
gm.set_targets(['GO:1', 'GO:2'], ['field_1', 'field_2'])
This is for when you want to lock into a set of documents by locking onto identifiers in some set of search fields. All other query operations behave as they should around it.
id_list | a list of ids to search for |
field_list | a list of fields ids to search across |
the current setting of query (‘q’)
this.get_default_query = function()
Getter for what the query variable ‘q’ will be set to on a reset_query.
n/a
the current setting of the default query
this.get_fundamental_query = function()
Getter for what the query variable ‘q’ will be set to on a reset_default_query.
n/a
the current setting of the fundamental default query
this.set = function( key, new_val )
Set an internal variable for the query. The internal variables are typically things like ‘qt’, ‘indent’, etc.--things that you might set and forget a while. It does /not/ include highly dynamic variables (like callback and packet) or querying variables like ‘q’ and ‘fq’; for those you need to use the API.
key | the name of the parameter to change |
new_val | what you want the new value to be |
n/a
this.get = function( key )
Get an internal variable for the query.
See set for the kinds of parameters that can be read.
key | the name of the parameter to get |
The found value of the key.
this.include_highlighting = function( hilite_p, html_elt_str )
Turn hilighting on or off (with true or false).
This essentially adds the parameters to the query string to make sure that basic highlighting on the search is returned.
It starts off as false. The optional html_elt_str argument defaults to:
<em class="hilite">
hilite_p | [optional] boolean |
html_elt_str | [serially optional] the HTML element string to use |
either false or the current string being used for the return element
this.set_personality = function( personality_id )
While we are always contacting the same Solr instance, we sometimes want to have different weights, facets, etc. This function allows us to use the pre-set ones defined in the constructor configuration argument.
Currently, this only sets the ‘facet.field’ internal variable.
personality_id | string |
Will return false if personality doesn’t exist
this.get_query_url = function()
Get the current invariant state of the manager returned as a encoded URL string (using encodeURI()).
This means the URL for the current query to the GOlr store, but without extra information about packets, callbacks, and the like.
This is generally appropriate for getting data, but maybe not for things like high-speed autocomplete where races can occur. For those, you might want to consider update or search.
n/a
URL string
this.push_excursion = function()
Save the current state of the manager--data and sticky filter information--onto an internal stack. Batch information is not stored.
Useful for gettinginto a state, doing something else, then returning to the original state.
n/a
the number of items on the excursion stack
this.pop_excursion = function()
Return to a previously pushed state. Batch items are not recovered.
n/a
boolean on whether a state was recovered
get_query_url <gpush_excursion>
this.get_download_url = function( field_list, in_arg_hash )
Get the current invariant state of the manager returned as a URL string.
This differs from get_query_url in that the generated string is intended for text-processing uses rather than computerized searching uses. The idea where is to create a TSV file for downloading and consumption.
Instead of downloading all of the results, a limited listed set can be downloaded using entity_list, which identifies documents by id.
rows | the number of rows to return; defaults to: 1000 |
encapsulator | how to enclose whitespace fields; defaults to: “” |
separator | separator between fields; defaults to: “%09” (tab) |
header | whether or not to show headers; defaults to: “false” |
mv_separator | separator for multi-valued fields; defaults to: “|” |
entity_list | list of specific download items in results; default null |
With the entity list, keep in mind that null and an empty list are handled in pretty much the same way--they are an indication that we are going after nothing specific, and so all results are game.
field_list | a list of fields to return |
in_arg_hash | [optional] additional optional arguments |
URL string
this.get_filter_query_string = function()
Get the current state of the manager, as defined by the current gross filter set--query, sticky filters, and standard filters-- returned as a URL query string (sans the ‘?’).
This differs from get_query_url and get_state_url in that the generated string is intended for applications that may want just enough information to recover filter state when the personality, and other types of information, are already known. It is intended to be part of a light RESTy bookmarking mechanism in larger application.
n/a
query string for current filters (sans the ‘?’)
this.get_state_url = function()
Get the current invariant state of the manager, plus the current personality as a parameter, returned as a URL string.
This differs from get_query_url in that the generated string is intended for applications that may want a little more information and hinting over just what the current search is. This method essentially parameterizes some of the “hidden state” of the manager.
n/a
URL string
this.load_url = function( url )
Makes a a best attempt to recover the state of a manager from the clues left in a data url. This can also (and probably should) be thought of as a “load bookmark” function. Theoretically, you should even be able to use “bookmarks” from alien installations.
Note that while this recovers enough to get the same data, certain “session”/”preference” type things that are not encoded in the url (e.g. filter stickiness, the contents of batch queues, non-default base queries, etc.) will not be replayed and must be recovered or guessed on an app by app basis..
Warning: this currently only replays a small subset of possible parameters. Currently: personality, q, fq, ???. In the future, this should no all non-session information.
Warning: Because there is more to bookmarks than just the major stuff, variants not supplied in the bookmark will be removed.
This returns true if the parameter portions of the new and bookmark urls match. However, this is often not the case--think shifting personalities, etc.
url | A URL string generated by a manager’s get_query_url (or similar) |
boolean
bbop.golr.manager.prototype.update = function( callback_type, rows, start )
The user code to select the type of update (and thus the type of callbacks to be called on data return).
This mechanism adds a couple of variables over other methods for bookkeeping: packet (incremented every time) and callback_type.
The currently recognized callback types are “reset” (for when you are starting or starting over) and “search” (what you typically want when you get new data) and “error” for when something went wrong. But only “search” and “reset” manipulate the system.
If rows or start are not set, they will both be reset to their initial values--this is to allow for paging on “current” results and then getting back to the business of searching with as little fuss as possible. Because of things like this, one should avoid calling this directly whenever possible and prefer simpler functionality of the wrapper methods: search, reset, and page.
callback_type | callback type string; ‘search’, ‘reset’ and ‘error’ |
rows | [optional] integer; the number of rows to return |
start | [serially optional] integer; the offset of the returned rows |
the query url (with the jQuery callback specific parameters)
Contructor for the GOlr query manager
bbop.golr.manager = function ( golr_loc, golr_conf_obj )
Turn on or off the verbose messages.
this.debug = function( p )
Limit the returns fields (the parameter “fl”) to the ones defined in the set of fields defined in results, label fields if available (i.e.
this.lite = function( use_lite_p )
Get the limit for a specified facet or the global limit.
this.get_facet_limit = function( field )
Change the number of facet values returned per call.
this.set_facet_limit = function( arg1, arg2 )
Permanently change the default number of facet values returned per call.
this.set_default_facet_limit = function( lim )
Either reset the global limit to the original (likely 25) and/or remove the specified filter.
this.reset_facet_limit = function( field )
Get the current number of results that will be returned.
this.get_results_count = function( field )
Change the number of result documents returned per call.
this.set_results_count = function( count )
Reset the number of documents to their original setting, likely 10.
this.reset_results_count = function()
Turn a plist to a hash containing the different properties that can be defined for a query filter.
this.plist_to_property_hash = function( plist )
Setter for query filters (‘fq’).
this.add_query_filter_as_string = function( filter_string, plist )
Setter for query filters (‘fq’).
this.add_query_filter = function( filter, value, plist )
Remover for query filters (‘fq’), is a plist is specified, it will only remove if all of the listed criteria are met.
this.remove_query_filter = function( filter, value, plist )
Reset the query filters (‘fq’); but leave sticky filters alone.
this.reset_query_filters = function()
Get a hash representing a query filter (‘fq’).
this.get_query_filter_properties = function( filter, value )
Get a list of hashes representing the query filters (‘fq’).
this.get_query_filters = function()
Get a list of hashes representing the current stucky query filters (‘fq’).
this.get_sticky_query_filters = function()
Get all of our query filter variables and try and make something of them that get_assemble can understand.
this.filter_list_to_assemble_hash = function( flist )
Simply ask the manager if a free text query (‘q’) makes sense at this point.
this.sensible_query_p = function( qfs )
It is up to the UI to do something interesting with this number.
this.last_packet_sent = function()
Clear all non-sticky query parameters to get back to a more “original” state.
this.clear = function()
Manually trigger the “reset” chain of events.
this.reset = function()
Trigger the “search” chain of events.
this.search = function()
Re-trigger the “search” chain of events, but with the variables set for a different section of the results.
this.page = function( rows, start )
This is a wrapper for page and should be preferred over a direct call to page.
this.page_previous = function()
This is a wrapper for page and should be preferred over a direct call to page.
this.page_next = function()
Trigger search on last page parameters.
this.page_last = function( total_document_count )
Return the number of rows the manager is currently set to.
this.get_page_rows = function()
Return the rows offset the manager is currently set to.
this.get_page_start = function()
Add a new query field to the query.
this.add_query_field = function( qf, boost )
Bulk getter/setter for the query fields--the fields that are searched (and by what weight) when using a query (‘q’ or set_query(), i.e.
this.query_field_set = function( qfs )
Bulk getter/setter for facets (technically ‘facet.field’).
this.facets = function( list_or_key )
Setter for the default query for the query variable (‘q’).
this.set_default_query = function( new_default_query )
Reset the default query back to “:”.
this.reset_default_query = function()
Setter for the query variable (‘q’).
this.set_query = function( new_query )
If the input is all alphanum or space, the input is tokenized.
this.set_comfy_query = function( new_query )
A limited setter, removing whatever else is on query.
this.set_id = function( new_id )
Like set_id, a limited setter.
this.set_ids = function( id_list )
Like a more generalized version of set_ids, a limited.
this.set_targets = function( id_list, field_list )
Getter for the query variable (‘q’).
this.get_query = function()
Getter for what the query variable ‘q’ will be set to on a reset_query.
this.get_default_query = function()
Remove/reset the query variable (‘q’); this set it back to the default query.
this.reset_query = function()
Getter for what the query variable ‘q’ will be set to on a reset_default_query.
this.get_fundamental_query = function()
Setter for the internal string variable to be appended to the end of a query.
this.set_extra = function( new_extra )
Remove/reset the extra bit.
this.remove_extra = function()
Set an internal variable for the query.
this.set = function( key, new_val )
Get an internal variable for the query.
this.get = function( key )
Unset (remove) an internal variable for the query.
this.unset = function( key )
Turn hilighting on or off (with true or false).
this.include_highlighting = function( hilite_p, html_elt_str )
While we are always contacting the same Solr instance, we sometimes want to have different weights, facets, etc.
this.set_personality = function( personality_id )
Returns the current personality, null if none.
this.get_personality = function()
Get the current invariant state of the manager returned as a encoded URL string (using encodeURI()).
this.get_query_url = function()
Save the current state of the manager--data and sticky filter information--onto an internal stack.
this.push_excursion = function()
Return to a previously pushed state.
this.pop_excursion = function()
Get the current invariant state of the manager returned as a URL string.
this.get_download_url = function( field_list, in_arg_hash )
Get the current state of the manager, as defined by the current gross filter set--query, sticky filters, and standard filters-- returned as a URL query string (sans the ‘?’
this.get_filter_query_string = function()
Get the current invariant state of the manager, plus the current personality as a parameter, returned as a URL string.
this.get_state_url = function()
Makes a a best attempt to recover the state of a manager from the clues left in a data url.
this.load_url = function( url )
“Save” the current manager state to run later in serial batch mode.
this.add_to_batch = function()
Return a pointer to the current batch urls.
this.batch_urls = function()
Return the next data to be processed, removing it from the batch queue in the process.
this.next_batch_url = function()
Clear the currently queued data batch.
this.reset_batch = function()
Output writer for this object/class.
bbop.golr.manager.prototype.to_string = function ()
The user code to select the type of update (and thus the type of callbacks to be called on data return).
bbop.golr.manager.prototype.update = function( callback_type, rows, start )