We have received some questions about query parsing in HCI such as "Why is this query not returning the documents I expect to see?," "Why is this query returning no results?," "Why is this query returning way too many results?"
First off: HCI Uses Solr Query Syntax (https://wiki.apache.org/solr/SolrQuerySyntax) for internal indexes.
A couple points of clarification and an example we received:
HCI's default search field is HCI_text, which means that by default, keyword search will only return hits in that field.
By default, Solr (the search engine HCI utilizes) will tokenize a query string on white space as well as punctuation and letter/number shifts.
We were asked about the query "VSP G1000/G1500 Gx00/Fx00 SVOS".
You can use Solr's query debugging UI to see how a query string will be parsed. Go to System Configuration > Services > Advanced Services > Index Management. Then select your index (shard) from the drop-down, click on query and check "debugQuery." I tested this query on an index with a default configuration. You can see the query was actually parsed as:
"HCI_text:vsp ((HCI_text:g1000/g1500 HCI_text:g) HCI_text:1000 HCI_text:g HCI_text:1500) ((HCI_text:gx00/fx00 HCI_text:gx) HCI_text:00 HCI_text:fx HCI_text:00) HCI_text:svos"
and so you would be getting hits on things like "1000," "g," etc. which you can imagine will return lots of "false positives"
The simplest way to get around this is to add quotes around complex tokens to prevent them from being parsed further, for example: "VSP \"G1000/G1500\" \"Gx00/Fx00\"
SVOS" (make sure to escape the quotes with a '\' if you are doing this over REST or CLI, but the escaping isn't necessary through the UI).
Additionally, you can find more information on search queries in HCI, as well as some examples in the online documentation at Search Administration > Index Collections > Querying an Index collection > Query syntax.
Hope this is helpful.
Retrieving data ...