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
Next revisionBoth sides next revision
documentation:technical:search_grammar [2010/03/31 13:32] mikerdocumentation:technical:search_grammar [2010/10/28 21:32] – update to reflect formalization of ^ and $ in phrase searches gmcharlton
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 118: Line 122:
   * **subject** -- Any standard subject field.  Also broken down into topic, temporal, geographic and name subjects by field   * **subject** -- Any standard subject field.  Also broken down into topic, temporal, geographic and name subjects by field
   * **series** -- Series title   * **series** -- Series title
 +  * **identifier** -- Accession numbers, standard numbers (ISxN, UPC, EAN, etc), local call number strings, etc
  
 == Registered search fields (from the stock config.metabib_field) == == Registered search fields (from the stock config.metabib_field) ==
Line 137: Line 142:
 |title|translated| |title|translated|
 |title|uniform| |title|uniform|
 +|identifier|isbn|
 +|identifier|issn|
 +|identifier|upc|
 +|identifier|ismn|
 +|identifier|ean|
 +|identifier|isrc|
 +|identifier|sici|
 +|identifier|bibcn|
 +|identifier|accession|
  
 == Registered class and field aliases == == Registered class and field aliases ==
Line 178: Line 192:
 |bib.titleuniform       | title         | uniform| |bib.titleuniform       | title         | uniform|
 |dc.title               | title         | | |dc.title               | title         | |
 +|id                     | identifier    | | 
 +|dc.identifier          | identifier    | | 
 +|eg.isbn                | identifier    | isbn| 
 +|eg.issn                | identifier    | issn| 
 +|eg.upc                 | identifier    | upc| 
 +|eg.callnumber          | identifier    | bibcn|
  
 == Registered facet fields (from the stock config.metabib_field) == == Registered facet fields (from the stock config.metabib_field) ==
Line 191: Line 210:
 |subject|temporal| |subject|temporal|
 |subject|topic| |subject|topic|
 +  
documentation/technical/search_grammar.txt · Last modified: 2022/02/10 13:34 by 127.0.0.1

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.