The moose likes Other Open Source Projects and the fly likes print results of wildcard search in Lucene Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "print results of wildcard search in Lucene" Watch "print results of wildcard search in Lucene" New topic
Author

print results of wildcard search in Lucene

Paulius Matulionis
Greenhorn

Joined: Aug 25, 2010
Posts: 1
Hello everyone,

I'm searching using wildcard search.
For e.g I'm searching for String hou*

And I want to print all results for e.g:
house
houses
housewives and so on...

I'm using this :



How can I display all words of wildcard search?

This message was edited 1 time. Last update was at by Paulius Matulionis

Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3206

Welcome to Javaranch Paulius Matulionis!


Cheers, Martijn - Blog, Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3206

Have you read the Lucene in Action book? I think common cases like this are covered in there.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Something like Document doc = searcher.doc(hits[i].doc) will get you the matching document, from which you can get all information that you have stored in the index.

I second the suggestion to get Lucene in Action; it'll save you a lot of time if you're serious about using Lucene.

This message was edited 2 times. Last update was at by Lester Burnham

 
 
subject: print results of wildcard search in Lucene
 
developer file tools