Hi all,

 

Since you can't (and it doesn't make sense to) use wildcards in phrase
queries, how do you construct a query to get results for phrases that
begin with a certain set of terms?  Here are some theoretical
examples...

 

Example 1 - I have an index where each document contains the contents of
short stories.  I want to return each document that begins with the
words "Once upon a time".  I know this in not valid Lucene syntax, but
what I would like to do is query for "Once upon a time"*

 

Example 2 - I have an index where each document contains numbered test
results....say test 1 - test 5000.  I want to return each document where
the test starts with the number 5.  So the query here would be (again I
know this isn't valid) something like "test 5"*

 

How can this be accomplished?

 

Thanks

Paul  

 

Reply via email to