Performing a partial word search without wildcards

Hi,

I would like to search for the word 'admin' when almost all the indexed
values are:

admin
adminblabla
admin_blabla
adminadminblabla
blablaadmin
admin.blabla

Here is my query JSON:

{
"query": {
"query_string": {
"fields": [
"name",
"description*",
"label*"
],
"query": "admin"
}
},
"fields": [
"name",
"label",
"fullName"
],sadasd
"from": 0,
"size": 10
}

I can of course use a wildcard like "admin*" but I would like to avoid this.

I don't know if the explanations by Clint and Raul in this thread are
relevant:
http://elasticsearch-users.115913.n3.nabble.com/What-is-required-for-partial-match-to-work-td3136814.html#a3144078

If they are, can you explain where and how to use the following:

{ content: {
type: "string",
index_analyzer: "ascAnalyzer1",
search_analyzer: "default"
}}

Cheers,
Ramin

--
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.

Prefix query is supported -
http://www.elasticsearch.org/guide/reference/query-dsl/prefix-query/

Thanks
Vineeth

On Thu, Mar 28, 2013 at 11:27 PM, Ramin Haeri Azad rhaeri@p3g.org wrote:

Hi,

I would like to search for the word 'admin' when almost all the indexed
values are:

admin
adminblabla
admin_blabla
adminadminblabla
blablaadmin
admin.blabla

Here is my query JSON:

{
"query": {
"query_string": {
"fields": [
"name",
"description*",
"label*"
],
"query": "admin"
}
},
"fields": [
"name",
"label",
"fullName"
],sadasd
"from": 0,
"size": 10
}

I can of course use a wildcard like "admin*" but I would like to avoid
this.

I don't know if the explanations by Clint and Raul in this thread are
relevant:
http://elasticsearch-users.115913.n3.nabble.com/What-is-required-for-partial-match-to-work-td3136814.html#a3144078

If they are, can you explain where and how to use the following:

{ content: {
type: "string",
index_analyzer: "ascAnalyzer1",
search_analyzer: "default"
}}

Cheers,
Ramin

--
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.

On Thu, 2013-03-28 at 10:57 -0700, Ramin Haeri Azad wrote:

Hi,

I would like to search for the word 'admin' when almost all the
indexed values are:

You need to use ngrams. There are many examples both in this forum and
on stackoverflow.

clint

--
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.