Hi everybody, after reading the documentation on the Solr site, I have the
following newbie-ish question:

On the Lucene query parser syntax page (
http://lucene.apache.org/java/2_4_0/queryparsersyntax.html) linked to from
the Solr query syntax page, they mention:
"If you are programmatically generating a query string and then parsing it
with the query parser then you should seriously consider building your
queries directly with the query API. In other words, the query parser is
designed for human-entered text, not for program-generated text."

What do they mean by "using the API"? If I use SolrJ to construct a
SolrQuery, doesn't that get processed by the query parser? How do I bypass
the query parser to set up a query directly?

Especially for token-values (values that fit a defined set, such as Enum
values), it seems silly for me to continually be appending, "+tokenField:(1,
2, 3)" to my query. Why should I write code to construct the query string,
then send this to the parser to parse the string into an object? Can't I set
these query parameters directly? If so, how?

- Daryl.

Reply via email to