lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Small" <>
Subject "starts with" query functionality
Date Fri, 02 Apr 2004 16:20:54 GMT
We have a requirement to return documents with a "title" field that starts with a certain letter.
 Is there a way to do something like this?  We're using the StandardAnalyzer
Example title fields:
This is the title of a document.
And this is a title of a different document.
This query doesn't fulfill the requirement:
+(t*)  - just want to return the 1st document that starts with "This", and not the 2nd article
that has "this" as the 2nd word.
Or is it just a matter of creating a field in the index called "title_starts_with" that would
look like this for the example:
Now, the query +(t) would only get a hit on the 1st document.
Or is there a better way?
View raw message