lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (JIRA) <j...@apache.org>
Subject [jira] [Commented] (SOLR-1980) Implement boundary match support
Date Fri, 03 Jun 2011 08:21:47 GMT

    [ https://issues.apache.org/jira/browse/SOLR-1980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043248#comment-13043248
] 

Jan Høydahl commented on SOLR-1980:
-----------------------------------

Really, this is a type of feature that should be implemented on the Lucene level with proper
query language support. Any suggestion on how this could be done, perhaps using the positions
and #terms metadata from the index instead of inserting special tokens at begin and end?

> Implement boundary match support
> --------------------------------
>
>                 Key: SOLR-1980
>                 URL: https://issues.apache.org/jira/browse/SOLR-1980
>             Project: Solr
>          Issue Type: New Feature
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>
> Sometimes you need to specify that a query should match only at the start or end of a
field, or be an exact match.
> Example content:
> 1) a quick fox is brown
> 2) quick fox is brown
> Example queries:
> "^quick fox" -> should only match 2)
> "brown$" -> should match 1) and 2)
> "^quick fox is brown$" -> should only match 2)
> Proposed way of implmementation is through a new BoundaryMatchTokenFilter which behaves
like this:
> On the index side it inserts special unique tokens at beginning and end of field. These
could be some weird unicode sequence.
> On the query side, it looks for the first character matching "^" or the last character
matching "$" and replaces them with the special tokens.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message