Pattern replace apostrophes?

My users have issues with apostrophes: I need to index and search "aaa's"
as it is, and without the apostrophe, as "aaas".

If I use a char_filter to remove apostrophes when indexing and when
searching, the _analyze endpoint shows me that they produce 'words' without
apostrophes like this (respectively):

{... {
end_offset => 5,
position => 1,
start_offset => 0,
token => "aaas",
type => "word",
} }

{
end_offset => 5,
position => 1,
start_offset => 0,
token => "aaas",
type => "word",
},

But there seems to be nothing I can do to find "aaas" / "aaa's" when
searching!

Is this expected?

TIA
Lee

--
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/a959fe9f-6899-47fd-a371-131c1e51071c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

What type of query are you using? Perhaps the query you are using is not
using the same analyzer at search time.

--
Ivan

On Tue, Oct 7, 2014 at 6:06 AM, Lee Gee leegee@gmail.com wrote:

My users have issues with apostrophes: I need to index and search "aaa's"
as it is, and without the apostrophe, as "aaas".

If I use a char_filter to remove apostrophes when indexing and when
searching, the _analyze endpoint shows me that they produce 'words' without
apostrophes like this (respectively):

{... {
end_offset => 5,
position => 1,
start_offset => 0,
token => "aaas",
type => "word",
} }

{
end_offset => 5,
position => 1,
start_offset => 0,
token => "aaas",
type => "word",
},

But there seems to be nothing I can do to find "aaas" / "aaa's" when
searching!

Is this expected?

TIA
Lee

--
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/a959fe9f-6899-47fd-a371-131c1e51071c%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a959fe9f-6899-47fd-a371-131c1e51071c%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%3DcQCOEYRTEuv75sRjh20iYS-tG%2BgBKJp6Dc75AexUkyYetQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

The index uses the keyword tokenizer, with edge-ngram (and other) filters —
it only wants to match from the start of the string, for autocomplete.

The search analyser is also keyword, with various filters.

The pattern-replace filter for apostrophes is applied to both.

On Tuesday, October 7, 2014 8:00:13 PM UTC+1, Ivan Brusic wrote:

What type of query are you using? Perhaps the query you are using is not
using the same analyzer at search time.

--
Ivan

On Tue, Oct 7, 2014 at 6:06 AM, Lee Gee <lee...@gmail.com <javascript:>>
wrote:

My users have issues with apostrophes: I need to index and search "aaa's"
as it is, and without the apostrophe, as "aaas".

If I use a char_filter to remove apostrophes when indexing and when
searching, the _analyze endpoint shows me that they produce 'words' without
apostrophes like this (respectively):

{... {
end_offset => 5,
position => 1,
start_offset => 0,
token => "aaas",
type => "word",
} }

{
end_offset => 5,
position => 1,
start_offset => 0,
token => "aaas",
type => "word",
},

But there seems to be nothing I can do to find "aaas" / "aaa's" when
searching!

Is this expected?

TIA
Lee

--
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/3c5fbb3b-decc-41f6-8be6-2a1f5f37f4be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

The problem was that it was not an apostrophe, but an opening single quote.

Have increased editor font size to address this issue.

On Tuesday, October 7, 2014 8:00:13 PM UTC+1, Ivan Brusic wrote:

What type of query are you using? Perhaps the query you are using is not
using the same analyzer at search time.

--
Ivan

On Tue, Oct 7, 2014 at 6:06 AM, Lee Gee <lee...@gmail.com <javascript:>>
wrote:

My users have issues with apostrophes: I need to index and search "aaa's"
as it is, and without the apostrophe, as "aaas".

If I use a char_filter to remove apostrophes when indexing and when
searching, the _analyze endpoint shows me that they produce 'words' without
apostrophes like this (respectively):

{... {
end_offset => 5,
position => 1,
start_offset => 0,
token => "aaas",
type => "word",
} }

{
end_offset => 5,
position => 1,
start_offset => 0,
token => "aaas",
type => "word",
},

But there seems to be nothing I can do to find "aaas" / "aaa's" when
searching!

Is this expected?

TIA
Lee

--
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/a959fe9f-6899-47fd-a371-131c1e51071c%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a959fe9f-6899-47fd-a371-131c1e51071c%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/d8e1d1c9-cc1e-49e7-88b8-e767dd2fac08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.