lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Irving, Dave" <>
Subject Building queries
Date Wed, 17 May 2006 12:19:43 GMT

First - thanks for Lucene! I started working with it a few days ago,
bought the Lucene In Action book, and Im very impressed with both.

Im integrating search in to an existing pet-project web application
where new fields for index / search may be added via configuration.
My idea is to have a simple FieldMetaData concept which provides info on
the type of data, the analyzer (if any) used for the field, boosts etc.
This would allow both the indexing front end and the search front end to
be driven by this meta-data.

This led me to two questions:

1) Are there any "best / common practises" for this that I've missed
during my web searches and reading of Lucene in Action?

2) I don't want to release the full query syntax to users: So I'll
probably have multiple fields in the UI, and then construct them in to a
query at the server side. One thing that is mentioned quite a bit in
docs is that the same analyser needs to be used when querying as was
used when indexing. Im guessing my FieldMetaData concept will help a bit
here - as I'll be able to track the analyser type employed for a field.
So, I just need to run the terms entered by the user in each field
against the appropriate analyser, and build up the query that way. Does
that sound like a sensible approach? Are there any code samples around
showing how to run search phrases through analysers and build up a

Many thanks in advance for any help,


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It
may contain proprietary material, confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any other party. If you are not
an intended recipient then please promptly delete this e-mail and any attachment and all copies
and inform the sender. Thank you.

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

View raw message