Hi,
I use Hibernate Search and have now the following problem. I don't want a query for a particular content but rather for all existing lucene data in a field (for field proposals in the ui).
Code:
@Entity
@Indexed
@Boost(2f)
public class Conference {
@Id
..
@DocumentId
private String id;
@Column(nullable = false, length = 200)
@Field(index = Index.TOKENIZED, store = Store.NO, boost = @Boost(2f))
private String name;
@Column(length = 150)
@Field(index = Index.TOKENIZED, store = Store.YES, boost = @Boost(1.3f))
private String cities;
Sample content:
id | name | cities
.. | abc | London, Paris, Berlin
.. | bcd | Paris, New York City, London
.. | cde |
.. | def | Berlin, Dallas, London
The query should return a set with the
5 elements:
Berlin, Dallas, London, New York City and Paris.
What’s the way to do this, via org.hibernate.search.query.dsl.QueryBuilder or org.apache.lucene.index.IndexReader? I checked both but found no solution.
Every help is very appreciated.
Thanks a lot,
Detlev