Overriding analyzer in term filter

Is this possible?

I have an analyzer using a path hierarchy tokenizer that I use on a
particular field. This works fine, but sometimes I want to do an
exact-match on the field. I can't quite work out how to get this working
though.

Thanks
A

--
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'm not sure I exactly understood the question.
What does not work as desired? You can do term queries
(http://www.elasticsearch.org/guide/reference/query-dsl/term-query/) which
should be "exact-match", if this is what you mean?

On Friday, 14 June 2013 08:05:09 UTC+2, Allan Johns wrote:

Is this possible?

I have an analyzer using a path hierarchy tokenizer that I use on a
particular field. This works fine, but sometimes I want to do an
exact-match on the field. I can't quite work out how to get this working
though.

Thanks
A

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

Try using multi field on the original field:
http://www.elasticsearch.org/guide/reference/mapping/multi-field-type/

One field and use an analyzer with a path hierarchy tokenizer and another
field can be non-analyzed. The term filter should be used on non-analyzed
fields (or with analyzers that only produce one token (lowercase,
ascii-folding, etc..).

--
Ivan

On Fri, Jun 14, 2013 at 3:49 AM, Erik Fäßler khituras@gmail.com wrote:

I'm not sure I exactly understood the question.
What does not work as desired? You can do term queries (
http://www.elasticsearch.org/guide/reference/query-dsl/term-query/) which
should be "exact-match", if this is what you mean?

On Friday, 14 June 2013 08:05:09 UTC+2, Allan Johns wrote:

Is this possible?

I have an analyzer using a path hierarchy tokenizer that I use on a
particular field. This works fine, but sometimes I want to do an
exact-match on the field. I can't quite work out how to get this working
though.

Thanks
A

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

Wait so I shouldn't be using a term filter in the first place? Now I'm
confused, I didn't think you had to be concerned about the analyzer in use
when using a term filter. What should I be using instead?

@Erik: Let's say I have a field value folder="/foo/bah/eek". Using a term
filter works fine and returns this document when I ask for "/foo",
"/foo/bah" or "/foo/bah/eek", which is what I want. However in one case, I
don't want this behaviour, I want an exact match instead.

On Sat, Jun 15, 2013 at 5:37 AM, Ivan Brusic ivan@brusic.com wrote:

Try using multi field on the original field:
http://www.elasticsearch.org/guide/reference/mapping/multi-field-type/

One field and use an analyzer with a path hierarchy tokenizer and another
field can be non-analyzed. The term filter should be used on non-analyzed
fields (or with analyzers that only produce one token (lowercase,
ascii-folding, etc..).

--
Ivan

On Fri, Jun 14, 2013 at 3:49 AM, Erik Fäßler khituras@gmail.com wrote:

I'm not sure I exactly understood the question.
What does not work as desired? You can do term queries (
http://www.elasticsearch.org/guide/reference/query-dsl/term-query/)
which should be "exact-match", if this is what you mean?

On Friday, 14 June 2013 08:05:09 UTC+2, Allan Johns wrote:

Is this possible?

I have an analyzer using a path hierarchy tokenizer that I use on a
particular field. This works fine, but sometimes I want to do an
exact-match on the field. I can't quite work out how to get this working
though.

Thanks
A

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

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

@Ivan thanks, multi field type looks like what I'm after.
A

On Sat, Jun 15, 2013 at 9:56 AM, Allan Johns nerdvegas@gmail.com wrote:

Wait so I shouldn't be using a term filter in the first place? Now I'm
confused, I didn't think you had to be concerned about the analyzer in use
when using a term filter. What should I be using instead?

@Erik: Let's say I have a field value folder="/foo/bah/eek". Using a term
filter works fine and returns this document when I ask for "/foo",
"/foo/bah" or "/foo/bah/eek", which is what I want. However in one case, I
don't want this behaviour, I want an exact match instead.

On Sat, Jun 15, 2013 at 5:37 AM, Ivan Brusic ivan@brusic.com wrote:

Try using multi field on the original field:
http://www.elasticsearch.org/guide/reference/mapping/multi-field-type/

One field and use an analyzer with a path hierarchy tokenizer and another
field can be non-analyzed. The term filter should be used on non-analyzed
fields (or with analyzers that only produce one token (lowercase,
ascii-folding, etc..).

--
Ivan

On Fri, Jun 14, 2013 at 3:49 AM, Erik Fäßler khituras@gmail.com wrote:

I'm not sure I exactly understood the question.
What does not work as desired? You can do term queries (
http://www.elasticsearch.org/guide/reference/query-dsl/term-query/)
which should be "exact-match", if this is what you mean?

On Friday, 14 June 2013 08:05:09 UTC+2, Allan Johns wrote:

Is this possible?

I have an analyzer using a path hierarchy tokenizer that I use on a
particular field. This works fine, but sometimes I want to do an
exact-match on the field. I can't quite work out how to get this working
though.

Thanks
A

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

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