Thanks Ivan.

That term query on the label field was, in fact on an analyzed field.
What is of concern at the moment is that this query:
{"query":{"term":{"inOf":"NodeBuilderType"}}}
is  on an unanalyzed field, defined thus:

        "inOf": {
            "index": "not_analyzed",
            "type": "string",
            "store": "yes"
        },

If all the ducks are lined up, it's not clear what the problem is for
that query.

On Wed, Jul 16, 2014 at 10:27 AM, Ivan Brusic <i...@brusic.com> wrote:
> By default, string fields are analyzed using the standard analyzer, which
> will tokenize and lowercase the input (I believe stop words are now NOT
> removed). A term query does not analyze the query, so it only works on non
> analyzed fields (or fields that use a keyword tokenizer). A term query for
> "kimchy" works because it already is lowercased and only has one token.
>
> Try using a match query or set the field to be non analyzed. The choice
> depends on your other use cases (do you require partial matching?).
>
> Cheers,
>
> Ivan
>
>
> On Wed, Jul 16, 2014 at 10:21 AM, Jack Park <jackp...@topicquests.org>
> wrote:
>>
>> Thank you very much. I was in the process of drafting a message that I
>> found that and made the query to look like these:
>>
>> {"query":{"term":{"label":"\"First instance node\""}}}
>> {"query":{"term":{"inOf":"NodeBuilderType"}}}
>>
>> Neither returns any hits.
>> In the same system, I did a text search with this query:
>> {"query":{"multi_match":{"query":"topic
>> map","fields":["details","label"]}}}
>>
>> and that worked perfectly.
>> So, I have two open issues:
>> 1- what's wrong with term query?
>> 2- there were 145 hits on the text search; need to configure the query
>> to do paging through those hits.
>>
>> Many thanks for this help
>> Jack
>>
>> On Wed, Jul 16, 2014 at 9:48 AM, David Pilato <da...@pilato.fr> wrote:
>> > You need to put it in a query.
>> >
>> > Have a look at
>> >
>> > http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/search.html
>> >
>> > --
>> > David ;-)
>> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
>> >
>> > Le 16 juil. 2014 à 18:04, Jack Park <jackp...@topicquests.org> a écrit :
>> >
>> > This exact query is not found in the list, so here goes. Just upgraded
>> > to
>> > 1.2.2.
>> >
>> > The query documentation
>> >
>> > http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-term-query.html
>> > gives this example:
>> >
>> > {
>> >    "term" : { "user" : "kimchy" }
>> > }
>> >
>> > So, my querydsl written for nodejs is this:
>> >
>> > {"term":{"inOf":"NodeBuilderType"}}
>> >
>> > I happen to know that documents satisfying that query exist, for
>> > instance:
>> >
>> > {"lox":"NodeBuilderSecondTopic","crtr":"SystemUser","sIco":"","lIco":"","crDt":"2014-07-16T08:45:21","srtDt":1405525521801,"lEdDt":"2014-07-16T08:45:21","isPrv":"false","label":["First
>> > instance node"],"details":["Seems
>> >
>> > likely"],"inOf":"NodeBuilderType","trCl",["NodeBuilderType","ASuperClass"],"sbOf":["ASuperClass"]}
>> >
>> > What I get back is an enormous stack trace, a portion of which from
>> > the error log below.
>> >
>> > Am I missing something?
>> >
>> > Many thanks in advance.
>> > Jack
>> >
>> > [2014-07-16 08:53:20.332] [ERROR] TopicMap - DP.__listNodesByQuery
>> > {"term":{"inOf":"NodeBuilderType"}} | Error:
>> > {"error":"SearchPhaseExecutionException[Failed to execute phase
>> > [query], all shards failed; shardFailures
>> > {[cawnH8a8S32Bpl96txGwyw][topics][2]:
>> > SearchParseException[[topics][2]: from[-1],size[-1]: Parse Failure
>> > [Failed to parse source [{\"term\":{\"inOf\":\"NodeBuilderType\"}}]]];
>> > nested: SearchParseException[[topics][2]: from[-1],size[-1]: Parse
>> > Failure [No parser for element [term]]];
>> > }{[cawnH8a8S32Bpl96txGwyw][topics][3]:
>> > SearchParseException[[topics][3]: from[-1],size[-1]: Parse Failure
>> > [Failed to parse source [{\"term\":{\"inOf\":\"NodeBuilderType\"}}]]];
>> > nested: SearchParseException[[topics][3]: from[-1],size[-1]: Parse
>> > Failure [No parser for element [term]]];
>> > }{[cawnH8a8S32Bpl96txGwyw][topics][0]:
>> > SearchParseException[[topics][0]: from[-1],size[-1]: Parse Failure
>> > [Failed to parse source [{\"term\":{\"inOf\":\"NodeBuilderType\"}}]]];
>> > nested: SearchParseException[[topics][0]: from[-1],size[-1]: Parse
>> > Failure [No parser for element [term]]];
>> > }{[cawnH8a8S32Bpl96txGwyw][topics][1]:
>> > SearchParseException[[topics][1]: from[-1],size[-1]: Parse Failure
>> > [Failed to parse source [{\"term\":{\"inOf\":\"NodeBuilderType\"}}]]];
>> > nested: SearchParseException[[topics][1]: from[-1],size[-1]: Parse
>> > Failure [No parser for element [term]]];
>> > }{[cawnH8a8S32Bpl96txGwyw][topics][4]:
>> > SearchParseException[[topics][4]: from[-1],size[-1]: Parse Failure
>> > [Failed to parse source [{\"term\":{\"inOf\":\"NodeBuilderType\"}}]]];
>> > nested: SearchParseException[[topics][4]: from[-1],size[-1]: Parse
>> > Failure [No parser for element [term]]]; }]","status":400}
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "elasticsearch" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to elasticsearch+unsubscr...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/elasticsearch/CAH6s0fw%3D2T3VpUa3-Ok4je_W6s6HW-dcZcEJ6qztk-v0PxjuzA%40mail.gmail.com.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "elasticsearch" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to elasticsearch+unsubscr...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/elasticsearch/977768D7-AFC8-40B6-8521-23C174341B38%40pilato.fr.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to elasticsearch+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyqrsFK5bbGW_rZMq%2BYa2UDR8yPPod0grgoHySGweBSyg%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQAKxFSqj1Fxv6r4NYnzs44-GXAzkLZKghSTq5FfhZL7nw%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyv%2B%2BrhcnG%3DNgFDo-pr7XTOsLbEOfvXO5QA_10OTEt5Zg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to