User Tools

Site Tools


documentation:technical:search_grammar

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documentation:technical:search_grammar [2010/06/15 12:22] mikerdocumentation:technical:search_grammar [2022/02/10 13:34] (current) – external edit 127.0.0.1
Line 14: Line 14:
     * Descending (newest first):<code>harry potter after(2000) author:rowling site(ARL-ATH) sort(pubdate)#descending</code>     * Descending (newest first):<code>harry potter after(2000) author:rowling site(ARL-ATH) sort(pubdate)#descending</code>
   * How about some nested boolean action:<code>("harry potter" && (stone || chamber)) && (author:rowling || subject:rowling) item_form(d) subject[Magic in literature]</code> (That last part is a facet.)   * How about some nested boolean action:<code>("harry potter" && (stone || chamber)) && (author:rowling || subject:rowling) item_form(d) subject[Magic in literature]</code> (That last part is a facet.)
 +  * Phrase searches can be left-anchored: <code>identifier|bibcn:"^123 ABC"</code> or right-anchored: <code>bibcn:"2004$"</code>
 +  * Phrase searches can also consider punctuation literally: <code>"C++"</code>
   * Speaking of facets, imagine a locally defined index definition in the keyword class called mat_type that indexes, say, 945$m, which is a local field holding bib-level "material type" strings.  Imagine further that this field is marked as a facet field, but not a search field.  You could:   * Speaking of facets, imagine a locally defined index definition in the keyword class called mat_type that indexes, say, 945$m, which is a local field holding bib-level "material type" strings.  Imagine further that this field is marked as a facet field, but not a search field.  You could:
     * Browse all of your DVD mat_types sorted by author:<code>keyword|mat_type[DVD] sort(author)</code>     * Browse all of your DVD mat_types sorted by author:<code>keyword|mat_type[DVD] sort(author)</code>
Line 30: Line 32:
 modifier_marker       := '#'   ### configurable, default modifier_marker       := '#'   ### configurable, default
 phrase_boundary       := '"' phrase_boundary       := '"'
 +phrase_left_anchor    := '^'
 +phrase_right_anchor   := '$'
 1_word_phrase_marker  := '+' 1_word_phrase_marker  := '+'
 negator               := '-' negator               := '-'
Line 42: Line 46:
 negated_word          := negator word negated_word          := negator word
 required_word         := 1_word_phrase_marker word  ### one-word phrase shortcut required_word         := 1_word_phrase_marker word  ### one-word phrase shortcut
-phrase                := phrase_boundary word { whitespace word } phrase_boundary+phrase                := phrase_boundary { phrase_left_anchor } word { whitespace word } { phrase_right_anchor } phrase_boundary
 term                  := word | negated_word | required_word | phrase { whitespace term } term                  := word | negated_word | required_word | phrase { whitespace term }
  
Line 111: Line 115:
   * **metabib** or **metarecord** -- Metarecord search, instead of direct bibliographic record search   * **metabib** or **metarecord** -- Metarecord search, instead of direct bibliographic record search
   * **staff** -- Staff search, which includes hidden records and non-transcendent records with no items or located URIs   * **staff** -- Staff search, which includes hidden records and non-transcendent records with no items or located URIs
 +  * Cover density ranking algorithm tuning parameters, as described in the [[http://www.postgresql.org/docs/9.0/interactive/textsearch-controls.html#TEXTSEARCH-RANKING|Postgres documentation]].
 +    * **CD_logDocumentLength**    => 1
 +    * **CD_documentLength**       => 2
 +    * **CD_meanHarmonic**         => 4
 +    * **CD_uniqueWords**          => 8
 +    * **CD_logUniqueWords**       => 16
 +    * **CD_selfPlusOne**          => 32
 +  * **lucky** -- Return only the first hit, à la Google's "I'm feeling lucky" button
  
 == Registered classes (from the stock config.metabib_class) == == Registered classes (from the stock config.metabib_class) ==
Line 206: Line 218:
 |subject|temporal| |subject|temporal|
 |subject|topic| |subject|topic|
 +  
documentation/technical/search_grammar.1276618947.txt.gz · Last modified: 2022/02/10 13:33 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.