You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by bluehu <hu...@gmail.com> on 2015/12/24 10:14:20 UTC
Can TextQuery specify only one field of the class?
*this is the example of TextQuery:*
TextQuery query_obj = new TextQuery<AffinityKey<UUID>,
Person>(Person.class, "Master");
*and the definition of Person class:*
private static class Person implements Serializable {
......
@QueryTextField
private String resume;
@QueryTextField
private String personDesc;
......
*I found the 2nd param of TextQuery can use wildcard characters like "*" and
"?". for example:*
TextQuery(Person.class, "Maste*?*");
TextQuery(Person.class, "Mas***");
1. Is there any detailed explanation or example about wildcard TextQuery?
*I found ignite will add "resume" and "personDesc" fields to Lucene Index,
but I want to query "Master" only in "resume" field(not including
"personDesc" field). Looks like following:*
TextQuery("Person.*resume*", "Master");
2. Can TextQuery specify only one field of the class?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Can-TextQuery-specify-only-one-field-of-the-class-tp2300.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Can TextQuery specify only one field of the class?
Posted by vkulichenko <va...@gmail.com>.
Hi,
You're right, text queries are based on Lucene full text search engine and
therefore fully support Lucene syntax [1].
E.g., query that searches only one field looks like this:
TextQuery(Person.class, "resume:Master");
[1] https://lucene.apache.org/core/2_9_4/queryparsersyntax.html
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Can-TextQuery-specify-only-one-field-of-the-class-tp2300p2304.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.