Thanks Nikolas. Filtering of non-index data is working now using _source.

Regards
Rama Krishna P

On Monday, November 10, 2014 7:08:02 PM UTC+5:30, Nikolas Everett wrote:
>
> Use _source['service'] instead. Much slower but doesn't need to the field 
> indexed. 
> On Nov 10, 2014 1:01 AM, "ramky" <panguluri....@gmail.com <javascript:>> 
> wrote:
>
>> Thanks Nikolas.
>> I tried the query but it failed to search on non-indexed field.
>>
>> Query i used is
>> {
>>   "filter": {
>>     "script": {
>>        "script": "doc['service'].value == http"
>>     }
>>   }
>> }
>> "service" is non-indexed field.
>>
>> Exception after execution is
>> {[x3a9BIGLRwOdhwpsaUZbrw][siem0511][0]: 
>> QueryPhaseExecutionException[[siem0511][0]: 
>> query[ConstantScore(cache(_type:siem))],from[0],size[10]: Query Failed 
>> [Failed to execute main query]]; nested: CompileException[[Error: No field 
>> found for [service] in mapping with types [siem]]\n[Near : {... 
>> doc['service'].value == http ....}]\n             ^\n[Line: 1, Column: 1]]; 
>> nested: ElasticsearchIllegalArgumentException[No field found for [service] 
>> in mapping with types [siem]]; }
>>
>> Please help.
>>
>> Thanks in advance.
>>
>> Regards
>> Ramky
>>
>>
>>
>>
>> On Friday, November 7, 2014 5:49:04 PM UTC+5:30, Nikolas Everett wrote:
>>>
>>> The first example on http://www.elasticsearch.org/
>>> guide/en/elasticsearch/reference/current/query-dsl-
>>> script-filter.html#query-dsl-script-filter should just if you replace > 
>>> with .equals
>>>
>>> On Fri, Nov 7, 2014 at 2:11 AM, ramky <panguluri....@gmail.com> wrote:
>>>
>>>> Thanks Nikolas Everett for your quick reply.
>>>>
>>>> Can you please provide me example to execute the same. I tried multiple 
>>>> times but unable to execute.
>>>>
>>>> Thanks in advance
>>>>
>>>> On Thursday, November 6, 2014 9:44:55 PM UTC+5:30, Nikolas Everett 
>>>> wrote:
>>>>>
>>>>> You can totally use a script filter checking the field against 
>>>>> _source.  Its super duper duper slow but you can do it if you need it 
>>>>> rarely.
>>>>>
>>>>> On Thu, Nov 6, 2014 at 11:13 AM, Ivan Brusic <iv...@brusic.com> wrote:
>>>>>
>>>>>> You cannot search/filter on a non-indexed field.
>>>>>>
>>>>>> -- 
>>>>>> Ivan
>>>>>>
>>>>>> On Wed, Nov 5, 2014 at 11:45 PM, ramakrishna panguluri <
>>>>>> panguluri....@gmail.com> wrote:
>>>>>>
>>>>>>> I have 10 fields inserted into elasticsearch out of which 5 fields 
>>>>>>> are indexed.
>>>>>>> Is it possible to search on non indexed field?
>>>>>>>
>>>>>>> Thanks in advance.
>>>>>>>
>>>>>>>
>>>>>>> Regards
>>>>>>> Rama Krishna P
>>>>>>>
>>>>>>> -- 
>>>>>>> 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 elasticsearc...@googlegroups.com.
>>>>>>> To view this discussion on the web visit 
>>>>>>> https://groups.google.com/d/msgid/elasticsearch/c63ac6bb-871
>>>>>>> 7-470e-a5e4-01a8bd75b769%40googlegroups.com 
>>>>>>> <https://groups.google.com/d/msgid/elasticsearch/c63ac6bb-8717-470e-a5e4-01a8bd75b769%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>> 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 elasticsearc...@googlegroups.com.
>>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>>> msgid/elasticsearch/CALY%3DcQDD0JYJeX%2BCmV%3DGACekwofjUYFQvoS
>>>>>> WQ86Th3r-MBWZtw%40mail.gmail.com 
>>>>>> <https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDD0JYJeX%2BCmV%3DGACekwofjUYFQvoSWQ86Th3r-MBWZtw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>>> 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 elasticsearc...@googlegroups.com.
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/elasticsearch/4d3e5636-1124-4dcb-b6be-b62f893cae39%
>>>> 40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/elasticsearch/4d3e5636-1124-4dcb-b6be-b62f893cae39%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> 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 elasticsearc...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elasticsearch/725d437c-988d-4462-98db-dc281c7e438c%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/elasticsearch/725d437c-988d-4462-98db-dc281c7e438c%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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/ebad6123-2700-4d25-aba0-f38e9ed61a1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to