Filter by specific value without mapping

What I'm trying to do is to get data by filtering term with exact
matching. I have ES 1.3.2 and I cannot do mapping, as attributes are
dynamic (different users has different attributes). My data:

{ id: 111,
org_id: 11,
approval: "approved",
...
}

{ id: 112,
org_id: 11,
approval: "not approved",
...
}

This request returns results:

curl -X GET 'host:9200/data/_search?pretty' -d '{
"filter":{
"term":{
"approval":"approved"
}
}
}

But this not:

curl -X GET 'host:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"approval":"not approved"
}
}
}

It's a dup of
ticket https://github.com/elasticsearch/elasticsearch/issues/8006#issuecomment-58160111
As I was followed here.

David Pilato proposed that "index has indexed probably not and approved"
and that there is no exact matching to "not approved". I tried to search
for word "not" and it works

curl -X GET 'host:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"approval":"not"
}
}
}

So, how can I filter by exact word matching "not approved"?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6ea46153-68a7-481f-9064-9e094094bf29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Just to be clear, actually I don't need any analyzer on filters

On Tuesday, October 7, 2014 12:57:32 PM UTC+3, Vladimir Krylov wrote:

What I'm trying to do is to get data by filtering term with exact
matching. I have ES 1.3.2 and I cannot do mapping, as attributes are
dynamic (different users has different attributes). My data:

{ id: 111,
org_id: 11,
approval: "approved",
...
}

{ id: 112,
org_id: 11,
approval: "not approved",
...
}

This request returns results:

curl -X GET 'host:9200/data/_search?pretty' -d '{
"filter":{
"term":{
"approval":"approved"
}
}
}

But this not:

curl -X GET 'host:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"approval":"not approved"
}
}
}

It's a dup of ticket
Filter by specific value without mapping · Issue #8006 · elastic/elasticsearch · GitHub
As I was followed here.

David Pilato proposed that "index has indexed probably not and approved"
and that there is no exact matching to "not approved". I tried to search
for word "not" and it works

curl -X GET 'host:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"approval":"not"
}
}
}

So, how can I filter by exact word matching "not approved"?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b4160387-cc59-48e4-9a96-ed29f32b4a6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I tried to set custom default analyzer
curl -XPUT 'host:9200/reports' -d '
{
"settings":{
"analysis": {
"analyzer": {
"default":{
"type": "pattern",
"pattern":"_________" // I know that cannot get
this splitter
}
}
}
}
}'
curl 'http://host:9200/reports/_analyze?pretty=1&field=filter__approval' -d
'not approved' # returns full string as one token
curl 'http://host:9200/reports/_analyze?pretty=1' -d 'foo,bar baz ASD: "
fdfd "'# returns full string as one token

Seems to be working. Is there better solution?

On Tuesday, October 7, 2014 12:57:32 PM UTC+3, Vladimir Krylov wrote:

What I'm trying to do is to get data by filtering term with exact
matching. I have ES 1.3.2 and I cannot do mapping, as attributes are
dynamic (different users has different attributes). My data:

{ id: 111,
org_id: 11,
approval: "approved",
...
}

{ id: 112,
org_id: 11,
approval: "not approved",
...
}

This request returns results:

curl -X GET 'host:9200/data/_search?pretty' -d '{
"filter":{
"term":{
"approval":"approved"
}
}
}

But this not:

curl -X GET 'host:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"approval":"not approved"
}
}
}

It's a dup of ticket
Filter by specific value without mapping · Issue #8006 · elastic/elasticsearch · GitHub
As I was followed here.

David Pilato proposed that "index has indexed probably not and approved"
and that there is no exact matching to "not approved". I tried to search
for word "not" and it works

curl -X GET 'host:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"approval":"not"
}
}
}

So, how can I filter by exact word matching "not approved"?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ff22ac98-2028-4476-862e-7a2bb82c4f52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

The field do not need a custom analyzer, they just need to be simply marked
as non_analyzed.

You can setup a dynamic template that states any new field should be non
analyzed.

You can still hardcode the mapping for specific fields.

Cheers,

Ivan
On Oct 7, 2014 2:57 AM, "Vladimir Krylov" s6numid@gmail.com wrote:

What I'm trying to do is to get data by filtering term with exact
matching. I have ES 1.3.2 and I cannot do mapping, as attributes are
dynamic (different users has different attributes). My data:

{ id: 111,
org_id: 11,
approval: "approved",
...
}

{ id: 112,
org_id: 11,
approval: "not approved",
...
}

This request returns results:

curl -X GET 'host:9200/data/_search?pretty' -d '{
"filter":{
"term":{
"approval":"approved"
}
}
}

But this not:

curl -X GET 'host:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"approval":"not approved"
}
}
}

It's a dup of ticket
Filter by specific value without mapping · Issue #8006 · elastic/elasticsearch · GitHub
As I was followed here.

David Pilato proposed that "index has indexed probably not and approved"
and that there is no exact matching to "not approved". I tried to search
for word "not" and it works

curl -X GET 'host:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"approval":"not"
}
}
}

So, how can I filter by exact word matching "not approved"?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/6ea46153-68a7-481f-9064-9e094094bf29%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6ea46153-68a7-481f-9064-9e094094bf29%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDpvwRMPmLTX2ung%2BS6o8nz0k2mMtgmvZwEQMSCygRAPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Tried to remove papping and make not_analizable
curl -XPUT "http://:9200$HOST/reports" -d'
{
"mappings": {
"default": {
"dynamic_templates": [
{
"store_generic" : {
"match" : "*",
"match_mapping_type" : "string",
"mapping" : {
"type" : "string",
"index" : "not_analyzed"
}
}

        }
     ]
  }

}
}'

But Easy filtering returns empty results for "approved", "not approved" or
"". Search example

curl -X GET 'http://localhost:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"general.approval": "approved"
}
}
}
'

Should I do other filtering syntax for this case?

On Tuesday, October 7, 2014 5:17:02 PM UTC+3, Ivan Brusic wrote:

The field do not need a custom analyzer, they just need to be simply
marked as non_analyzed.

You can setup a dynamic template that states any new field should be non
analyzed.

Elasticsearch Platform — Find real-time answers at scale | Elastic

You can still hardcode the mapping for specific fields.

Cheers,

Ivan
On Oct 7, 2014 2:57 AM, "Vladimir Krylov" <s6n...@gmail.com <javascript:>>
wrote:

What I'm trying to do is to get data by filtering term with exact
matching. I have ES 1.3.2 and I cannot do mapping, as attributes are
dynamic (different users has different attributes). My data:

{ id: 111,
org_id: 11,
approval: "approved",
...
}

{ id: 112,
org_id: 11,
approval: "not approved",
...
}

This request returns results:

curl -X GET 'host:9200/data/_search?pretty' -d '{
"filter":{
"term":{
"approval":"approved"
}
}
}

But this not:

curl -X GET 'host:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"approval":"not approved"
}
}
}

It's a dup of ticket
Filter by specific value without mapping · Issue #8006 · elastic/elasticsearch · GitHub
As I was followed here.

David Pilato proposed that "index has indexed probably not and approved"
and that there is no exact matching to "not approved". I tried to search
for word "not" and it works

curl -X GET 'host:9200/reports/_search?pretty' -d '{
"filter":{
"term":{
"approval":"not"
}
}
}

So, how can I filter by exact word matching "not approved"?

--
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/6ea46153-68a7-481f-9064-9e094094bf29%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6ea46153-68a7-481f-9064-9e094094bf29%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4cc3fe20-296c-4a63-af9c-ec1516e3f54e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.