java - Provide a List of values as search Criteria in Hibernate Search -


I have applied the hibernate search and it works fine.

So if I say that I want to get all the employees, I use the following code

  Questionbilder qb = Full Text Integration Manager .getSearchFactory () .buildQueryBuilder (). ForEntity (employee class) .get (); org.apache.lucene.search.Query query = qb.keyword (). onFields ("name") .mailing ("Captain"). createQuery (); // Javax.preistence.Query javax.preistence.Query persistenceQuery = fullTextEntityManager .createFullTextQuery (query, Employee class) Wrap the Lusen query; // Execute search list & amp; Staff; & Gt; Results = StabilityActral (); System.out.println ("Number of jobs:" + results);   

My question is whether I want to give a list of values ​​as search criteria, then Hibernate Search provides any way to do this. For example, if I want to get an employee from a table whose names are similar to the following list [Abhi, Juhi, Zone, Paul, James]

To search for many possible words in the same area, just add them all to the matching section. query the search document with storm or electricity in their history luceneQuery = mythQB.keyword (). OnField ("History"). Milan ("Hurricane Power"). createQuery ();

Check Document



Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -