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
Post a Comment