lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fehling <>
Subject QueryValidator
Date Thu, 05 May 2011 07:26:58 GMT
Dear list,

I need a QueryValidator and don't mind writing one but don't want
to reinvent the wheel in case there is already something.

Is this the right list for talking about a QueryValidator or
should it belong to SOLR?

What do I mean with a QueryValidator?
I think about something like validating the query before or after parsing it.
Currently invalid queries [e.g. text:(:foo AND bar) ] throw exceptions
which pop up to the top. Not only that they show up in the logs
(which is good) they also give unuseful result page to jetty (which is bad).
And they also waste time for searching what can't be searched.

What should the QueryValidator do?
- check the query against the searchable fields of the schema (validate it)
- give options of fallback strategies
   -- let it through as raw
   -- remove specific chars (e.g. all ":" which have not a valid search field before)
   -- ...
- in case of an invalid query don't try to start a search but give a clean no-hit-page
   with a status and the cause

Actually it must be located somewhere around the parser.

What do think of this?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message