Re: Find documents contained in search term

2012-08-20 Thread Aditya
Hi You need to use prefix query for your requirement. Below are my thoughts and hope it helps. Say "Hello World" is your phrase. 1. Do a phrase query with your phrase ("Hello World") 2. If not found then strip the last character and then do prefix query ("Hello Worl") 3. Continue step 2 still yo

Re: Find documents contained in search term

2012-08-17 Thread davidbrai
I was hoping I didn't have to iterate through the short documents. I have about ~1M of them currently and this process needs to be very fast. So I understand there is not such functionality available in lucene. -- View this message in context: http://lucene.472066.n3.nabble.com/Find-documents-c

Re: Find documents contained in search term

2012-08-17 Thread Ian Lea
Can't see how you could do it with standard queries, but you could reverse the process and use a MemoryIndex. Add the single target phrase to the memory index then loop round all docs executing a search for each one. Maybe use PrefixQuery although I'd worry about performance. Try it and see. Bu