I like the idea of the filter since I am making heavy use of filters for this particular query, but how would one go about constructing it efficiently at query time? All I can see is hacking around not being able to use the * as the first character.

Les

Erick Erickson wrote:

You could create a Lucene Filter that had a bit for each document that
had a first or last name and use that at query time to restrict your
results appropriately. You could create this at startup time or at
query time. See CachingWrapperFilter for a way to cache it.


Another approach would be to add a dummy field to each document,
something like HASFIRSTORLASTNAME. At index time, when
you index a document, if it has a first or last name, put "yes" in the
field. Otherwise, put "no".

Then, at search time, add an +HASFIRSTORLASTNAME:yes to the
query......

You could add as many states to this field as you want.


Erick


On 5/10/07, Les Fletcher <[EMAIL PROTECTED]> wrote:


I have a question about empty fields.  I want to run a query that will
search against a few particular fields for the query term but then also
also check to see if a two other fields have any value at all.  i.e., I
want to search for a set records but don't want to return a record if
that record has blank first and last name fields.  Any help would be
greatly appreciated.

Les

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to