Question about facets and get full terms

Hello, sory for my English

i am use that query for get all fields of one tag

{
"query" : {
"match_all" : { }
},
"facets" : {
"Params_1" : {
"terms" : {
"field" : "Params_1",
}
}
}
}

and elasticsearch return to me result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

All great, but one small trouble. Me need to return a full term, for
example "more text", and don't return "more" and "text" as two different
terms.
How i can change query?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

You don't have to change the query but the mapping.
Have a look at Put Mapping API: Elasticsearch Platform — Find real-time answers at scale | Elastic. Set your field Params_1 as not_analyzed (Elasticsearch Platform — Find real-time answers at scale | Elastic) and then run again the same query.

Hope this helps

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 17 sept. 2013 à 23:14, Pashkevich Aleksandr serious2008@gmail.com a écrit :

Hello, sory for my English

i am use that query for get all fields of one tag

{
"query" : {
"match_all" : { }
},
"facets" : {
"Params_1" : {
"terms" : {
"field" : "Params_1",
}
}
}
}
and elasticsearch return to me result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

All great, but one small trouble. Me need to return a full term, for example "more text", and don't return "more" and "text" as two different terms.
How i can change query?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

i try that query

$comand =' curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '
{

    "properties" : {
       "Params_1" : {
            "type" : "string",
            "store" : "yes",
            "index" : "not_analyzed",
            "null_value" : "na"
        }
    }

}

and elastic return

{"ok":true,"acknowledged":true}

then i run my query and elastic return the same result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

среда, 18 сентября 2013 г., 1:02:16 UTC+3 пользователь David Pilato написал:

You don't have to change the query but the mapping.
Have a look at Put Mapping API:
Elasticsearch Platform — Find real-time answers at scale | Elastic.
Set your field Params_1 as not_analyzed (
Elasticsearch Platform — Find real-time answers at scale | Elastic) and
then run again the same query.

Hope this helps

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 17 sept. 2013 à 23:14, Pashkevich Aleksandr <serio...@gmail.com<javascript:>>
a écrit :

Hello, sory for my English

i am use that query for get all fields of one tag

{
"query" : {
"match_all" : { }
},
"facets" : {
"Params_1" : {
"terms" : {
"field" : "Params_1",
}
}
}
}

and elasticsearch return to me result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

All great, but one small trouble. Me need to return a full term, for
example "more text", and don't return "more" and "text" as two different
terms.
How i can change query?

--
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:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Start a new index (delete the old one).
Index again your documents.
Check logs.

If it does not work, please provide a full curl recreation. It will hep to understand what you are exactly doing.

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

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 18 sept. 2013 à 00:25, Pashkevich Aleksandr serious2008@gmail.com a écrit :

i try that query
$comand =' curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '
{

    "properties" : {
       "Params_1" : {
            "type" : "string",
            "store" : "yes",
            "index" : "not_analyzed",
            "null_value" : "na"
        }
    }

}
and elastic return
{"ok":true,"acknowledged":true}

then i run my query and elastic return the same result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

среда, 18 сентября 2013 г., 1:02:16 UTC+3 пользователь David Pilato написал:
You don't have to change the query but the mapping.
Have a look at Put Mapping API: Elasticsearch Platform — Find real-time answers at scale | Elastic. Set your field Params_1 as not_analyzed (Elasticsearch Platform — Find real-time answers at scale | Elastic) and then run again the same query.

Hope this helps

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 17 sept. 2013 à 23:14, Pashkevich Aleksandr serio...@gmail.com a écrit :

Hello, sory for my English

i am use that query for get all fields of one tag

{
"query" : {
"match_all" : { }
},
"facets" : {
"Params_1" : {
"terms" : {
"field" : "Params_1",
}
}
}
}
and elasticsearch return to me result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

All great, but one small trouble. Me need to return a full term, for example "more text", and don't return "more" and "text" as two different terms.
How i can change query?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Start a new index (delete the old one).
Index again your documents.

After that curl

curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '

{

   "properties" : {

        "Params_1" : {"type" : "string", "index" : "not_analyzed"},

        "Articul" : {"type" : "integer"}

    }

}

'

I insert new value that query i use

curl -XPOST localhost:9200/test/type3/368800 -d

'{"Articul":"1","Names":"Sample 1","Price":"1232","Cat":"1","Params_1":"text"}'

curl -XPOST localhost:9200/test/type3/368801 -d

'{"Articul":"7","Names":"Sample
2","Price":"1234","Cat":"1","Params_1":"more mored text"}'

curl -XPOST localhost:9200/test/type3/368802 -d

'{"Articul":"10","Names":"Sample 3","Price":"124323","Cat":"2","Params_1":"more
text"}'

when i add new record, i use that curl query

curl -X POST "http://localhost:9200/test/type1/_search?pretty=true" -d '
{
"query" : {
"match_all" : { }
},
"sort" : [
{"Articul" : {"order" : "asc", "mode" : "avg"}}
],
"facets" : {
"tag" : {
"terms" : {
"field" : "Params_1"
}
}
}
}
'

and esatic return ordered records 1,10,7 rather than 1, 7, 10 and return
facets terms

"facets" : { "tag" : { "_type" : "terms", "missing" : 0, "total" :
3151716, "other" : 0, "terms" : [ { "term" : "texts", "count" : 1050572}, {"term" : "text","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "mores","count" : 525286}
] } }

среда, 18 сентября 2013 г., 1:33:19 UTC+3 пользователь David Pilato написал:

Start a new index (delete the old one).
Index again your documents.
Check logs.

If it does not work, please provide a full curl recreation. It will hep to
understand what you are exactly doing.

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

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 18 sept. 2013 à 00:25, Pashkevich Aleksandr <serio...@gmail.com<javascript:>>
a écrit :

i try that query

$comand =' curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '
{

    "properties" : {
       "Params_1" : {
            "type" : "string",
            "store" : "yes",
            "index" : "not_analyzed",
            "null_value" : "na"
        }
    }

}

and elastic return

{"ok":true,"acknowledged":true}

then i run my query and elastic return the same result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

среда, 18 сентября 2013 г., 1:02:16 UTC+3 пользователь David Pilato
написал:

You don't have to change the query but the mapping.
Have a look at Put Mapping API:
Elasticsearch Platform — Find real-time answers at scale | Elastic.
Set your field Params_1 as not_analyzed (
Elasticsearch Platform — Find real-time answers at scale | Elastic) and
then run again the same query.

Hope this helps

David Pilato | Technical Advocate | *Elasticsearch.comhttp://elasticsearch.com/
*
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 17 sept. 2013 à 23:14, Pashkevich Aleksandr serio...@gmail.com a
écrit :

Hello, sory for my English

i am use that query for get all fields of one tag

{
"query" : {
"match_all" : { }
},
"facets" : {
"Params_1" : {
"terms" : {
"field" : "Params_1",
}
}
}
}

and elasticsearch return to me result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

All great, but one small trouble. Me need to return a full term, for
example "more text", and don't return "more" and "text" as two different
terms.
How i can change query?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Your first curl command is incorrect. Type name is missing.
Look at the example with type tweet:

$ curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d '
{
"tweet" : {
"properties" : {
"message" : {"type" : "string", "store" : "yes"}
}
}
}
'

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 18 sept. 2013 à 00:55, Pashkevich Aleksandr serious2008@gmail.com a écrit :

Start a new index (delete the old one).
Index again your documents.
After that curl
curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '
{

   "properties" : {
        "Params_1" : {"type" : "string", "index" : "not_analyzed"},
        "Articul" : {"type" : "integer"}
    }

}
'
I insert new value that query i use
curl -XPOST localhost:9200/test/type3/368800 -d '{"Articul":"1","Names":"Sample 1","Price":"1232","Cat":"1","Params_1":"text"}'
curl -XPOST localhost:9200/test/type3/368801 -d '{"Articul":"7","Names":"Sample 2","Price":"1234","Cat":"1","Params_1":"more mored text"}'
curl -XPOST localhost:9200/test/type3/368802 -d '{"Articul":"10","Names":"Sample 3","Price":"124323","Cat":"2","Params_1":"more text"}'
when i add new record, i use that curl query
curl -X POST "http://localhost:9200/test/type1/_search?pretty=true" -d '
{
"query" : {
"match_all" : { }
},
"sort" : [
{"Articul" : {"order" : "asc", "mode" : "avg"}}
],
"facets" : {
"tag" : {
"terms" : {
"field" : "Params_1"
}
}
}
}
'
and esatic return ordered records 1,10,7 rather than 1, 7, 10 and return facets terms
"facets" : {
"tag" : {
"_type" : "terms",
"missing" : 0,
"total" : 3151716,
"other" : 0,
"terms" : [ {
"term" : "texts",
"count" : 1050572
}, {
"term" : "text",
"count" : 525286
}, {
"term" : "more",
"count" : 525286
}, {
"term" : "mores",
"count" : 525286
}

]
}
}

среда, 18 сентября 2013 г., 1:33:19 UTC+3 пользователь David Pilato написал:
Start a new index (delete the old one).
Index again your documents.
Check logs.

If it does not work, please provide a full curl recreation. It will hep to understand what you are exactly doing.

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

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 18 sept. 2013 à 00:25, Pashkevich Aleksandr serio...@gmail.com a écrit :

i try that query
$comand =' curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '
{

    "properties" : {
       "Params_1" : {
            "type" : "string",
            "store" : "yes",
            "index" : "not_analyzed",
            "null_value" : "na"
        }
    }

}
and elastic return
{"ok":true,"acknowledged":true}

then i run my query and elastic return the same result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

среда, 18 сентября 2013 г., 1:02:16 UTC+3 пользователь David Pilato написал:
You don't have to change the query but the mapping.
Have a look at Put Mapping API: Elasticsearch Platform — Find real-time answers at scale | Elastic. Set your field Params_1 as not_analyzed (Elasticsearch Platform — Find real-time answers at scale | Elastic) and then run again the same query.

Hope this helps

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 17 sept. 2013 à 23:14, Pashkevich Aleksandr serio...@gmail.com a écrit :

Hello, sory for my English

i am use that query for get all fields of one tag

{
"query" : {
"match_all" : { }
},
"facets" : {
"Params_1" : {
"terms" : {
"field" : "Params_1",
}
}
}
}
and elasticsearch return to me result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

All great, but one small trouble. Me need to return a full term, for example "more text", and don't return "more" and "text" as two different terms.
How i can change query?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

when i use that sample from my php scripts

esatics return that error

{"error":"MergeMappingException[Merge failed with failures {[mapper
[Парметр_1] has different index values, mapper [Парметр_1] has different
store values, mapper [Парметр_1] has different tokenize values, mapper
[Парметр_1] has different index_analyzer]}]","status":400}

when i try that sample form SSH console
elastics return

{"ok":true,"acknowledged":true}

and i try that curl query

curl -X POST "http://localhost:9200/test/type1/_search?pretty=true" -d '

{

"query" : {

    "match_all" : {  }

},

"sort" : [

    {"Articul" : {"order" : "asc", "mode" : "avg"}}     

],

"facets" : {

    "tag" : {

        "terms" : {

           "field" : "Params_1"

        }

    }

}

}

'

and result not change

среда, 18 сентября 2013 г., 2:02:31 UTC+3 пользователь David Pilato написал:

Your first curl command is incorrect. Type name is missing.
Look at the example with type tweet:

$ curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d '
{
"tweet" : {
"properties" : {
"message" : {"type" : "string", "store" : "yes"}
}
}
}
'

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 18 sept. 2013 à 00:55, Pashkevich Aleksandr <serio...@gmail.com<javascript:>>
a écrit :

Start a new index (delete the old one).

Index again your documents.

After that curl

curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '

{

   "properties" : {

        "Params_1" : {"type" : "string", "index" : "not_analyzed"},

        "Articul" : {"type" : "integer"}

    }

}

'

I insert new value that query i use

curl -XPOST localhost:9200/test/type3/368800 -d

'{"Articul":"1","Names":"Sample 1","Price":"1232","Cat":"1","Params_1":"text"}'

curl -XPOST localhost:9200/test/type3/368801 -d

'{"Articul":"7","Names":"Sample
2","Price":"1234","Cat":"1","Params_1":"more mored text"}'

curl -XPOST localhost:9200/test/type3/368802 -d

'{"Articul":"10","Names":"Sample 3","Price":"124323","Cat":"2","Params_1":"more
text"}'

when i add new record, i use that curl query

curl -X POST "http://localhost:9200/test/type1/_search?pretty=true" -d '
{
"query" : {
"match_all" : { }
},
"sort" : [
{"Articul" : {"order" : "asc", "mode" : "avg"}}
],
"facets" : {
"tag" : {
"terms" : {
"field" : "Params_1"
}
}
}
}
'

and esatic return ordered records 1,10,7 rather than 1, 7, 10 and return
facets terms

"facets" : { "tag" : { "_type" : "terms", "missing" : 0, "total" :
3151716, "other" : 0, "terms" : [ { "term" : "texts", "count" : 1050572}, {"term" : "text","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "mores","count" : 525286}
] } }

среда, 18 сентября 2013 г., 1:33:19 UTC+3 пользователь David Pilato
написал:

Start a new index (delete the old one).
Index again your documents.
Check logs.

If it does not work, please provide a full curl recreation. It will hep
to understand what you are exactly doing.

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

--
David Pilato | Technical Advocate | *Elasticsearch.comhttp://elasticsearch.com/
*
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 18 sept. 2013 à 00:25, Pashkevich Aleksandr serio...@gmail.com a
écrit :

i try that query

$comand =' curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '
{

    "properties" : {
       "Params_1" : {
            "type" : "string",
            "store" : "yes",
            "index" : "not_analyzed",
            "null_value" : "na"
        }
    }

}

and elastic return

{"ok":true,"acknowledged":true}

then i run my query and elastic return the same result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

среда, 18 сентября 2013 г., 1:02:16 UTC+3 пользователь David Pilato
написал:

You don't have to change the query but the mapping.
Have a look at Put Mapping API:
Elasticsearch Platform — Find real-time answers at scale | Elastic.
Set your field Params_1 as not_analyzed (
Elasticsearch Platform — Find real-time answers at scale | Elastic) and
then run again the same query.

Hope this helps

David Pilato | Technical Advocate | *Elasticsearch.comhttp://elasticsearch.com/
*
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 17 sept. 2013 à 23:14, Pashkevich Aleksandr serio...@gmail.com a
écrit :

Hello, sory for my English

i am use that query for get all fields of one tag

{
"query" : {
"match_all" : { }
},
"facets" : {
"Params_1" : {
"terms" : {
"field" : "Params_1",
}
}
}
}

and elasticsearch return to me result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

All great, but one small trouble. Me need to return a full term, for
example "more text", and don't return "more" and "text" as two different
terms.
How i can change query?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

As I said before, you have FIRST to remove your data (index or type at least).
Please GIST a CURL recreation as explained in details at this URL: Elasticsearch Platform — Find real-time answers at scale | Elastic

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 18 sept. 2013 à 01:11, Pashkevich Aleksandr serious2008@gmail.com a écrit :

when i use that sample from my php scripts

esatics return that error
{"error":"MergeMappingException[Merge failed with failures {[mapper [Парметр_1] has different index values, mapper [Парметр_1] has different store values, mapper [Парметр_1] has different tokenize values, mapper [Парметр_1] has different index_analyzer]}]","status":400}
when i try that sample form SSH console
elastics return
{"ok":true,"acknowledged":true}
and i try that curl query
curl -X POST "http://localhost:9200/test/type1/_search?pretty=true" -d '
{
"query" : {
"match_all" : { }
},
"sort" : [
{"Articul" : {"order" : "asc", "mode" : "avg"}}
],
"facets" : {
"tag" : {
"terms" : {
"field" : "Params_1"
}
}
}
}
'
and result not change

среда, 18 сентября 2013 г., 2:02:31 UTC+3 пользователь David Pilato написал:
Your first curl command is incorrect. Type name is missing.
Look at the example with type tweet:

$ curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d '
{
"tweet" : {
"properties" : {
"message" : {"type" : "string", "store" : "yes"}
}
}
}
'

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 18 sept. 2013 à 00:55, Pashkevich Aleksandr serio...@gmail.com a écrit :

Start a new index (delete the old one).
Index again your documents.
After that curl
curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '
{

   "properties" : {
        "Params_1" : {"type" : "string", "index" : "not_analyzed"},
        "Articul" : {"type" : "integer"}
    }

}
'
I insert new value that query i use
curl -XPOST localhost:9200/test/type3/368800 -d '{"Articul":"1","Names":"Sample 1","Price":"1232","Cat":"1","Params_1":"text"}'
curl -XPOST localhost:9200/test/type3/368801 -d '{"Articul":"7","Names":"Sample 2","Price":"1234","Cat":"1","Params_1":"more mored text"}'
curl -XPOST localhost:9200/test/type3/368802 -d '{"Articul":"10","Names":"Sample 3","Price":"124323","Cat":"2","Params_1":"more text"}'
when i add new record, i use that curl query
curl -X POST "http://localhost:9200/test/type1/_search?pretty=true" -d '
{
"query" : {
"match_all" : { }
},
"sort" : [
{"Articul" : {"order" : "asc", "mode" : "avg"}}
],
"facets" : {
"tag" : {
"terms" : {
"field" : "Params_1"
}
}
}
}
'
and esatic return ordered records 1,10,7 rather than 1, 7, 10 and return facets terms
"facets" : {
"tag" : {
"_type" : "terms",
"missing" : 0,
"total" : 3151716,
"other" : 0,
"terms" : [ {
"term" : "texts",
"count" : 1050572
}, {
"term" : "text",
"count" : 525286
}, {
"term" : "more",
"count" : 525286
}, {
"term" : "mores",
"count" : 525286
}

]
}
}

среда, 18 сентября 2013 г., 1:33:19 UTC+3 пользователь David Pilato написал:
Start a new index (delete the old one).
Index again your documents.
Check logs.

If it does not work, please provide a full curl recreation. It will hep to understand what you are exactly doing.

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

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 18 sept. 2013 à 00:25, Pashkevich Aleksandr serio...@gmail.com a écrit :

i try that query
$comand =' curl -XPUT "http://localhost:9200/test/type1/_mapping" -d '
{

    "properties" : {
       "Params_1" : {
            "type" : "string",
            "store" : "yes",
            "index" : "not_analyzed",
            "null_value" : "na"
        }
    }

}
and elastic return
{"ok":true,"acknowledged":true}

then i run my query and elastic return the same result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

среда, 18 сентября 2013 г., 1:02:16 UTC+3 пользователь David Pilato написал:
You don't have to change the query but the mapping.
Have a look at Put Mapping API: Elasticsearch Platform — Find real-time answers at scale | Elastic. Set your field Params_1 as not_analyzed (Elasticsearch Platform — Find real-time answers at scale | Elastic) and then run again the same query.

Hope this helps

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 17 sept. 2013 à 23:14, Pashkevich Aleksandr serio...@gmail.com a écrit :

Hello, sory for my English

i am use that query for get all fields of one tag

{
"query" : {
"match_all" : { }
},
"facets" : {
"Params_1" : {
"terms" : {
"field" : "Params_1",
}
}
}
}
and elasticsearch return to me result

"facets" : {"tag" : {"_type" : "terms","missing" : 0,"total" : 3151716,"other" : 0,"terms" : [
{"term" : "mores","count" : 525286}, {"term" : "more","count" : 525286}, {"term" : "text","count" : 525286}, {"term" : "texts","count" : 1050572} ]}}

All great, but one small trouble. Me need to return a full term, for example "more text", and don't return "more" and "text" as two different terms.
How i can change query?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.