You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by roySolr <ro...@gmail.com> on 2011/10/26 11:34:52 UTC

solr.PatternReplaceFilterFactory AND endoffset

Hi,

I have some problems with the patternreplaceFilter. I can't use the
worddelimiter because i only want to replace some special chars given by
myself.

Some example:

Tottemham-hotspur (london)
Arsenal (london)

I want this:
replace "-" with " "
"(" OR ")" with "". 

In the analytics i see this:

position	1
term text	tottemham hotspur london
startOffset	0
endOffset	26

So the replacefilter works. Now i want to search "tottemham hotspur london".
This gives no results.

position	1
term text	tottemham hotspur london
startOffset	0
endOffset	24

It works when i search for "tottemham-hotspur (london)".
I think the problem is the difference in offset(24 vs 26). I need some
help...



--
View this message in context: http://lucene.472066.n3.nabble.com/solr-PatternReplaceFilterFactory-AND-endoffset-tp3454049p3454049.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: solr.PatternReplaceFilterFactory AND endoffset

Posted by Erick Erickson <er...@gmail.com>.
What does your admin/analysis page show? And how about the
results with &debugQuery=on?

Best
Erick

On Wed, Oct 26, 2011 at 5:34 AM, roySolr <ro...@gmail.com> wrote:
> Hi,
>
> I have some problems with the patternreplaceFilter. I can't use the
> worddelimiter because i only want to replace some special chars given by
> myself.
>
> Some example:
>
> Tottemham-hotspur (london)
> Arsenal (london)
>
> I want this:
> replace "-" with " "
> "(" OR ")" with "".
>
> In the analytics i see this:
>
> position        1
> term text       tottemham hotspur london
> startOffset     0
> endOffset       26
>
> So the replacefilter works. Now i want to search "tottemham hotspur london".
> This gives no results.
>
> position        1
> term text       tottemham hotspur london
> startOffset     0
> endOffset       24
>
> It works when i search for "tottemham-hotspur (london)".
> I think the problem is the difference in offset(24 vs 26). I need some
> help...
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/solr-PatternReplaceFilterFactory-AND-endoffset-tp3454049p3454049.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>