Copyright (C) 2017-2019 The Open Library Foundation
This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.
This is a Stripes UI module which is the cope of ui-invetoru for the ElasticSearch POC.
UI provides autosuggestion for search options, operators and boolean operators.
The APIs support CQL, and the UI parses the query entered into the search field into CQL. However, users must adhere to the following structures:
search option
operator
term
e.g."Title (all)"
=
Boston
search option
operator
term
boolean operator
search option
operator
term
... e.g."Title (all)"
=
Boston
or
Title (all)
=
"Los Angeles"
...search option
operator
(term
boolean operator
term)
e.g."Title (all)"
=
(Boston
or
"Los Angeles")
search option
operator
(term
boolean operator
term
boolean operator
term
...)
e.g."Title (all)"
=
(Boston
or
Monaco
or
"San Francisco"
...)
Examples of parsed queries before submitting to API:
"Title (all)" = Boston
is parsed intitle all "Boston"
"Title (all)" = Boston or "Title (all)" = "Los Angeles"
is parsed intitle all "Boston" OR title all "Los Angeles"
"Title (all)" = (Boston or "Los Angeles")
is parsed intitle all "Boston" OR title all "Los Angeles"
"Title (all)" = (Boston or Monaco or "San Francisco")
is parsed in(title all "Boston" OR title all "Monaco") OR title all "San Francisco"
We need to hit the Enter
button to confirm each element of the structure. However, we can
also confirm the search option
, operator
and boolean operator
using the space
button.
When we use parentheses, our term contains a boolean operator
, and we need to hit
the Enter
button for each part of the term
. For example, "Title (all)"
=
(Boston
or
Monaco)
we need to hit the Enter
button for (Boston
, or
and Monaco)
are required.
When the entered element is URL or contains two or more words, it is automatically quoted.
When we need to edit several words in a term, we must press the Enter
button after editing
each word, in this case, the quotes are pasted automatically. Otherwise, we can first edit
all the words in the term by adding quotes ourselves where needed, and then press the enter
button once.
Search option | Search option CQL |
---|---|
Title (all) | title all |
Contributor | contributors= |
Identifier (all) | identifiers.value== |
ISSN | issn== |
ISBN | isbn== |
Subject | subjects all |
Instance UUID | id== |
Instance HRID | hrid== |
Electronic access all fields | electronicAccess== |
Electronic access - URI | electronicAccess.uri== |
Electronic access - Public note | electronicAccess.publicNote all |
Electronic access - Link Text | electronicAccess.linkText all |
Electronic access - Materials Specified | electronicAccess.materialsSpecification all |
Search option | Search option CQL |
---|---|
ISSN | issn== |
ISBN | isbn== |
Call number | holdings.fullCallNumber== |
Holdings HRID | holdings.hrid== |
Electronic access all fields | electronicAccess== |
Electronic access - URI | electronicAccess.uri== |
Electronic access - Public note | electronicAccess.publicNote all |
Electronic access - Link Text | electronicAccess.linkText all |
Electronic access - Materials Specified | electronicAccess.materialsSpecification all |
Search option | Search option CQL |
---|---|
Barcode | items.barcode== |
ISSN | issn== |
ISBN | isbn== |
Call number | items.effectiveCallNumberComponents== |
Item HRID | items.hrid== |
Electronic access all fields | electronicAccess== |
Electronic access - URI | electronicAccess.uri== |
Electronic access - Public note | electronicAccess.publicNote all |
Electronic access - Link Text | electronicAccess.linkText all |
Electronic access - Materials Specified | electronicAccess.materialsSpecification all |
When the search field is empty, and the user enters text that is not one of the suggested
in the dropdown list, then the search will be performed by keyword all
search option.
Operator | Operator CQL |
---|---|
= | it is not added to CQL query |
Boolean operator | Boolean operator CQL |
---|---|
or | OR |
and | AND |
not | NOT |
See the related ui-users module.
Other modules.
See project UIIN at the FOLIO issue tracker.
Other FOLIO Developer documentation is at dev.folio.org