Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
factor to use updated lucene StandardAnalyzer constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmason committed Nov 3, 2011
1 parent 1b05103 commit 95de3db
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -96,7 +96,7 @@ public void search()
private FullTextQuery searchQuery(String searchQuery) throws ParseException
{
String[] projectFields = { "slug", "name", "description" };
QueryParser parser = new MultiFieldQueryParser(Version.LUCENE_29, projectFields, new StandardAnalyzer());
QueryParser parser = new MultiFieldQueryParser(Version.LUCENE_29, projectFields, new StandardAnalyzer(Version.LUCENE_29));

This comment has been minimized.

Copy link
@seanf

seanf Nov 3, 2011

Contributor

The parameterless constructor is actually defaulting to Version.LUCENE_24 in my workspace...

parser.setAllowLeadingWildcard(true);
Query luceneQuery = parser.parse(QueryParser.escape(searchQuery));
return ((FullTextEntityManager) entityManager).createFullTextQuery(luceneQuery, HProject.class);
Expand Down

0 comments on commit 95de3db

Please sign in to comment.