Note that there are some explanatory texts on larger screens.

plurals
  1. POHibernate Search: Not tokenized query
    primarykey
    data
    text
    <p>I'm using Hibernate Search. The problem is that, when I perform a search this string:</p> <p>"l" </p> <p>I haven't results... If I try with this...</p> <p>"l*"</p> <p>result is:</p> <p>"Lampada bla bla" "Lampione bla bla bla" "Lost"</p> <p>This is my pojo</p> <pre><code>@Id @GeneratedValue @DocumentId private Long id; @Field(index=Index.TOKENIZED, store=Store.YES ) private String nome; @Field(index=Index.TOKENIZED,store=Store.YES, termVector=TermVector.YES) private String descrizione; @Column(length=30) public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } @Column(length=100) public String getDescrizione() { return descrizione; } public void setDescrizione(String descrizione) { this.descrizione = descrizione; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Override public String toString() { return String.format("(%s) %s: %s", id, nome, descrizione); } </code></pre> <p>This is my java class:</p> <pre><code>Session session = super.session(); List result = new ArrayList(); luceneSession = Search.getFullTextSession(session); String[] fields = (String[]) boostsNField.keySet().toArray(new String[boostsNField.keySet().size()]); QueryParser parser = new MultiFieldQueryParser(Version.LUCENE_30, fields, new StandardAnalyzer(Version.LUCENE_30), boostsNField); StandardAnalyzer analyzer = new StandardAnalyzer(Version.LUCENE_30); try { Query luceneQuery = parser.parse(queryString); org.hibernate.Query fullTextQuery = luceneSession.createFullTextQuery( luceneQuery ); // E' possibile scegliere impostare il class da ricercare result = fullTextQuery.list(); } catch (ParseException e) { </code></pre> <p>Where is the problem??!?!?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload