Skip to content Skip to main navigation Skip to footer

Search Strings

Use search strings to set up custom searches for Explore buttons, bulletin boards, slideshows, and more!

What is a Search String? | Create a Search String | Separators & Operators | Query Types & Values | Examples

A search string is some plain text that includes types, values, and operators that are easily combined to form a search query. For example, ((smart::cat)&&(smart::dog)) would search for items in your collection that contain both cats and dogs. Alexandria uses predefined syntax to interpret such strings, allowing you to compose your own search strings capable of performing complex queries against your database. These can be used directly in the search interface or as the basis for Explore buttonsslideshows, links and more.

Search strings must be enclosed within double-parentheses ((queryType::searchValue)). Alexandria will locate the first and last parentheses and evaluate everything between from left-to-right. If there are “nested” parentheses, they will be evaluated first. Use parentheses within the string to differentiate multiple expressions, like this:

((queryType::searchValue) && (queryType::searchValue))

You can build a search string from scratch by manually combining various queries. However, we recommend starting with a pre-built string created in Search:

  1. In Search, set up your search. This could include defining a Search Type; typing a term into the search bar; filtering by Study Programs, Medium, or Genre; or using Advanced Search for more complex searches. We highly recommend using Advanced Search to build your search string!
  2. Conduct the search.
  3. Click on the Share button on the right under Options.
  4. Click on the search string to copy it to your clipboard.

If necessary, you can then paste the string into a text editor and modify or add to the queries manually (see Query Types & Values and Separators & Operators).

Does this seem complicated? Don’t worry—you don’t have to know all of this! Simply set up an advanced search to get the results you want, then Share and copy the ‘search string’.

Once you’re done customizing your search string, add it to an Explore buttonslideshowbulletin, or more for others to view or use.

Keep reading for all the technical stuff!

SeparatorsFunction
::Use a double colon (::) as the separator between query types and search values.
::#To perform a special “variant” for search values, use the separator of “::#”. For example, ((series::#Harry Potter)) searches for an exact series match of “Harry Potter”. The way that special variants are handled depends on the individual query type. Although it’s always valid to include the #, it may be ignored in many cases.
Operatorsfunction
&&Performs the Boolean operator AND.
||Performs the Boolean operator OR.
&-Performs the Boolean operator AND NOT.
Separate terms using two hyphens without spaces (–) to search for a range of results such as dates, ratings, or call numbers. For example: ((copycallnumber::FIC EVA–FIC EVE)).
” “Enclosing words in quotation marks (“ ”) tells Alexandria to interpret the character sequence literally, and not as part of the normal search string syntax. For example, double-hyphens (–) in search strings are interpreted as a range. However, two hyphens also separate subfields in subject headings. Therefore, you must contain certain search phrases in quotations in order to get relevant results, such as ((subject::“Basketball — Tournaments — United States”)).

Tip—search this page (using your browser tools) to find the specific thing you are looking for, e.g. “genre”.

QUERY TYPESEARCH VALUEEXAMPLEUSAGE NOTES
accessionAccession Date(DateTime)(accession::201611170000)(accession::201611170000–201612170000)(accession::#201611150000)Searches by Accession Date in YYYYMMDDHHMM.
Use “::#” as the separator to make this a begins with search.
authorAuthor Names(Text)((author::rowling))((author::#rowling) && (author::#j k))Searches fields:Personal Name—100a, 100q, 700a, 700q.Corporate Names—110a, 710a.Meeting name—111a, 711a.Use “::#” as the separator to make this an exact phrase search.
awardsAwards Notes(Text)((awards::ala) && (awards::notable) && (awards::books))((awards::#caldecott) && (awards::#honor) && (awards::#book))Searches field 586a.Use “::#” as the separator to make this a near term search.
bibliographicBibliographic Term(Text)((bibliographic::whitestone) && (bibliographic::publishers))Searches field 653a.Use “::#” as the separator to make this a near term search.
curriculumCurriculum Term(Text)((curriculum::geography) && (curriculum::212))Searches field 658a.Use“::#”as the separator to make this a near term search.
electronicTitle Policy(Numeric Value, 0 or 1)((electronic::1))Setting ((electronic::1)) searches for items with an electronic resource policy only.
genreGenre Term(Text)((genre::science) && (genre::fiction))((genre::war) && (genre::stories))((genre::dystopians))Searches field 655a.Ignores the “#” (if used) in the separator.
hidetitleTitle Attribute(Numeric Value, 0 or 1)((hidetitle::1))Setting ((hidetitle::1)) overrides the “Hide Title” settings and causes all titles to be displayed.
interestInterest Term(Text)((interest::mg))Searches field 521a.Use“::#”as the separator to make this an exact match search.
ISBNISBN(Numeric Value)((isbn::0760712107))((isbn::0439064864))Searches field 020a.Ignores the “#” (if used) in the separator.
ISSNISSN(Numeric Value)((issn::0689849974))Searches field 022a.Ignores the “#” (if used) in the separator.
languageLanguage(Text)((language::eng))((language::german))Searches subfields:Language Code—41aUniform Title—130l, 730lLanguage Note—546a.Use“::#”as the separator to make this an exact match search.
LCCNLCCN(Numeric Value)((lccn::2003002086))Searches field 010a.Ignores the “#” (if used) in the separator.
linkLink Description(Text)((link::mackinvia))Searches field 856_y.
mediumMedium Type(Text)((medium::book))((medium::text–unmediated–volume))Searches fields:Title Statement—245hContent, Media, Carrier Type—336a, 337a, 338aUse“::#”as the separator to make this a near term search.
notesNote(Text)((notes::ships))Searches fields:Content Notes—505aGeneral Notes—500aSummary Notes—520aUse“::#”as the separator to make this a near term search.
popularityPopularity(Text)((popularity::90))((popularity::70–90))((popularity::90)) will search for all items with a popularity score of 90% or aboveUse “::#” as the separator to search below the popularity number for weeding purposes.
pubyearPubyear(Text)((pubyear::1996))((pubyear::1950–1955))Searches fields:Publication Year—264cUse“::#”as the separator to make this a begins with search.
ratingRatings, x’ 10(Numeric Value)((rating::40))((rating::50))((rating::40–50))Exactly 4 StarsExactly 5 StarsRange, 4 through 5 Stars
savedlistGUID(GUID)((savedlist::5C8E874133AF4058B5527AC5F6B57E63))((savedlist::0D4E6E52E1444A74BAE4A3E792AA4527))Returns all titles in a specified saved list.Do not combine with other types or used with multiple operators.Ignores the “#” (if used) in the separator.Saved List GUIDs are found in URLs generated when clicking Share (“”).
seriesSeries Title/Statement(Text)((series::harry) && (series::potter))((series::boxcar) && (series::children) && (series::mysteries))((series::hunger) && (series::games) && (series::trilogy))Searches fields:Series Statement—490aSeries Uniform Title—830a.Use“::#”as the separator to make this an exact match search.
smartRelevancy Ranked Algorithm(Text)((smart::harry potter))((smart::suzanne collins))((smart::mystery))Searches on a multitude of fields and orders the results based on a proprietary weighting algorithm. A Smart Search should be used wherever you would normally specify a “keyword” type search.
studyinterestlevelStudy Program Interest Level(Text)((studyinterestlevel::mg))((studyinterestlevel::ad))Searches fields:Study Program Interest Level—526bTarget Audience Note—521a, for Lexile Codes
studypointcountStudy Program Point Value, x’s 10(Numeric Value)((studypointcount::15))((studypointcount::10–15))Searches field 526d.Applies to Accelerated Reader and Reading Counts Only.
studyprogramnamecodeStudy Program Name Code(Numeric Value)((studyprogramnamecode::1))Searches by StudyProgram.Each Study Program is assigned a number:1=Accelerated Reader2=Reading Counts3=Fountas and Pinnell4=Guided Reading5=Lexile.
studyreadinglevelStudy Program Reading Level(Text)(studyreadinglevel::01.10)
(studyreadinglevel::00200)
(studyreadinglevel::a)
(studyreadinglevel::00500–02000)
Searches fields:Study Program Reading Level—526c, for Accelerated Reader and Reading CountsTarget Audience Note—521a for all others.For AR/RC format as: 00.00For Lexile format as: 00000For others, format as: x
subjectwordsSubject(Text)((subjectwords::united) && (subjectwords::states))((subjectwords::navy))Searches fields:Personal Name—Fields 600a, 600x, 600y, 600zCorporate Name—610z, 610x, 610y, 610zMeeting Name—611a, 611x, 611y, 611zUniform Title—630z, 630x, 650y, 650zGeographic Name—651z, 651x, 651y, 651zUse“::#”as the separator to make this a near term search.
titleTitle(Text)((title::the) && (title::mystery) && (title::of) &&
(title::the) && (title::stolen) && (title::boxcar))((title::#holes))
Searches fields:Translation of Title—242a, 242bTitle Statement—245a, 245bVarying Form of Title—246a, 246bFormer Title—247a, 247bUse “::#” as the separator to make this an exact phrase search.Uniform title 130a
titlecallnumberTitle Call Number(Text)((titlecallnumber::793.7))((titlecallnumber::793.7 ta))((titlecallnumber::#793.7 tan))Searches field 991aUse“::#”as the separator to make this a begins with search.
titlersnRSN(Numeric Value)((titlersn::4139))Searches for a specific titlersn.
titlersnsRSN(Numeric Value)((titlersns::nn,nn,nn))A comma delimited list of title rsns (e.g. from temp lists).
COPY QUERY TYPES & VALUES
QUERY TYPESEARCH VALUEEXAMPLEUSAGE NOTES
copycallnumberCopy Call Number(Text)((copycallnumber::FIC))((copycallnumber::FIC EVE))Searches field 852hUse “::#” as the separator to make this a begins with search.
copybarcodeCopy Barcode(Text)((copybarcode::10456))((copybarcode::10456–10457))Searches field 852p
ADDITIONAL CENTRALIZED CATALOG QUERY TYPES AND VALUES
QUERY TYPESEARCH VALUEEXAMPLEUSAGE NOTES
sitecodeSite Code(Text)((sitecode::ams))The site code assigned by the librarian.
sitersnRSN(Numeric Value)((sitersn::5))((sitersn::3–5))The sitersn is the location of a site within the database.
KNOCOPYKNOCOPY(Text)((smart::oz) && (sitersn::1) || (site::KNOCOPY))When used, KNOCOPY will return electronic items that have no copies. In other words, items that belong to the entire catalog rather than a specific site.
NON-INDEX QUERY PARAMETERS
QUERY TYPESEARCH VALUEEXAMPLEUSAGE NOTES
numrecordsNumrecords(Numeric Value)((numrecords::10))Limits the number of items returned in a query.Has a max limit of 1000 no matter what number is entered.

Here are some examples of combined types and/or multiple operators.

Alexandria only accepts a maximum of ten expressions in a single search string.

General Title

((author::rowling) &- (title::harry))
((subjectwords::civil) && (subjectwords::war) && (medium::book))

Smart Search

((smart::harry potter) && (medium::book))
((smart::oz) && (medium::electronic) && (medium::resource))

Accession

((accession::#201501010000))
((accession::201501010000–201601010000))

Combined and Boolean Searches

((smart::animals) &- (smart::birds) || (smart::reptiles))
((series::graphic) && (series::novels) && (medium::electronic) || (medium::ebook))

Rating

((rating::40) && (medium::book))
((rating::30–50) && (author::king))

Study Programs

Accelerated Reader

((studyprogramnamecode::1))
((studyprogramnamecode::1) && (studyreadinglevel::03.00–03.50))
((studyprogramnamecode::1) && (studyreadinglevel::03.00–03.50) && (studypointcount::15–20))

Reading Counts

((studyprogramnamecode::2))
((studyprogramnamecode::2) && (studyreadinglevel::03.00–05.50))
((studyprogramnamecode::2) && (studyreadinglevel::03.00–05.50) && (studyinterestlevel::mg) && (studypointcount::15–20))

Fountas and Pinnell

((studyprogramnamecode::3))
((studyprogramnamecode::3) && (studyreadinglevel::D))

Guided Reading

((studyprogramnamecode::4))
((studyprogramnamecode::4) && (studyreadinglevel::D))

Lexile

((studyprogramnamecode::5))
((studyprogramnamecode::5) && (studyreadinglevel::00300–00500))
((studyprogramnamecode::5) && (studyreadinglevel::00100–00200) && (studyinterestlevel::ad))