Highlights problems with a filtered query


(Alexandre Heimburger) #1

Hi folks,

I have this query which does not highlight anything :

{"query":
{"filtered":
{"query": {"query_string":
{"default_field":"title","default_operator":"AND","query":"che"}},
"filter": {"or":[{"term":{"locations":1}},{"term":
{"locations":2}}]},
"highlight":{"fields":{"title":{"fragment_size":
150,"number_of_fragments":3}}}
}
}
}

The result of the query is OK but nothing is highlighted.

Thanks.


(Shay Banon) #2

Can you gist a full recreation? (http://www.elasticsearch.org/help).
On Monday, March 14, 2011 at 1:30 PM, alheim wrote:

Hi folks,

I have this query which does not highlight anything :

{"query":
{"filtered":
{"query": {"query_string":
{"default_field":"title","default_operator":"AND","query":"che"}},
"filter": {"or":[{"term":{"locations":1}},{"term":
{"locations":2}}]},
"highlight":{"fields":{"title":{"fragment_size":
150,"number_of_fragments":3}}}
}
}
}

The result of the query is OK but nothing is highlighted.

Thanks.


(Alexandre Heimburger) #3

Here is the gitst URL. Thanks.

git://gist.github.com/869446.git

On 14 mar, 16:11, Shay Banon shay.ba...@elasticsearch.com wrote:

Can you gist a full recreation? (http://www.elasticsearch.org/help).

On Monday, March 14, 2011 at 1:30 PM, alheim wrote:

Hi folks,

I have this query which does not highlight anything :

{"query":
{"filtered":
{"query": {"query_string":
{"default_field":"title","default_operator":"AND","query":"che"}},
"filter": {"or":[{"term":{"locations":1}},{"term":
{"locations":2}}]},
"highlight":{"fields":{"title":{"fragment_size":
150,"number_of_fragments":3}}}
}
}
}

The result of the query is OK but nothing is highlighted.

Thanks.


(Lukáš Vlček) #4

Hi,

Check here for correct query JSON https://gist.github.com/869979
https://gist.github.com/869979Note I moved the highlight element.

Regards,
Lukas

On Mon, Mar 14, 2011 at 5:59 PM, alheim alexheimburger@gmail.com wrote:

Here is the gitst URL. Thanks.

git://gist.github.com/869446.git

On 14 mar, 16:11, Shay Banon shay.ba...@elasticsearch.com wrote:

Can you gist a full recreation? (http://www.elasticsearch.org/help).

On Monday, March 14, 2011 at 1:30 PM, alheim wrote:

Hi folks,

I have this query which does not highlight anything :

{"query":
{"filtered":
{"query": {"query_string":
{"default_field":"title","default_operator":"AND","query":"che"}},
"filter": {"or":[{"term":{"locations":1}},{"term":
{"locations":2}}]},
"highlight":{"fields":{"title":{"fragment_size":
150,"number_of_fragments":3}}}
}
}
}

The result of the query is OK but nothing is highlighted.

Thanks.


(Alexandre Heimburger) #5

Perfect, thx a lot !

On Mon, Mar 14, 2011 at 11:09 PM, Lukáš Vlček lukas.vlcek@gmail.com wrote:

Hi,

Check here for correct query JSON https://gist.github.com/869979
https://gist.github.com/869979Note I moved the highlight element.

Regards,
Lukas

On Mon, Mar 14, 2011 at 5:59 PM, alheim alexheimburger@gmail.com wrote:

Here is the gitst URL. Thanks.

git://gist.github.com/869446.git

On 14 mar, 16:11, Shay Banon shay.ba...@elasticsearch.com wrote:

Can you gist a full recreation? (http://www.elasticsearch.org/help).

On Monday, March 14, 2011 at 1:30 PM, alheim wrote:

Hi folks,

I have this query which does not highlight anything :

{"query":
{"filtered":
{"query": {"query_string":
{"default_field":"title","default_operator":"AND","query":"che"}},
"filter": {"or":[{"term":{"locations":1}},{"term":
{"locations":2}}]},
"highlight":{"fields":{"title":{"fragment_size":
150,"number_of_fragments":3}}}
}
}
}

The result of the query is OK but nothing is highlighted.

Thanks.

--
Alexandre Heimburger
R&D Manager
blueKiwi Software
tel : +33687880997
email : ahb@bluekiwi-software.com
adress : 93 rue Vieille du Temple, 75003 Paris

What is blueKiwi? blueKiwi - the first Enterprise Social Software Suite in
the world building professional networks on conversations and relationships

  • helps large organizations increase their productivity, foster innovations
    and boost people satisfaction.

(system) #6