Hi,
I have a view in my application that shows a list of Foo items in my system. That list will get filtered based on what the user types into a search box. Searching and filtering based on attributes works great and was a breeze to configure. What i'm having trouble with is coming up with a query to show me all my items.
Code:
MultiFieldQueryParser parser = new MultiFieldQueryParser(defaultNames, new StandardAnalyzer());
org.apache.lucene.search.Query luceneQuery = luceneQuery = parser.parse(search);
FullTextEntityManager fullTextEntityManager = Search.createFullTextEntityManager(em);
FullTextQuery searchCriteria = fullTextEntityManager.createFullTextQuery(luceneQuery, Foo.class);
I guess i was hoping to give search a value of * which would then return everything in the index that is a Foo.class Is there a way to do this in Hibernate Search? I guess as a back up i could just query against the database, but i'm not too excited with the idea of maintaing my hibernateSearch - search code as well as the typical hibernate HQL query portion of it if/when tables/columns/etc changes.
Thoughts?
Thanks,