lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Mitchell (JIRA)" <>
Subject [jira] [Created] (SOLR-5521) MoreLikeThis component fails when item id is negative (begins with hyphen)
Date Mon, 02 Dec 2013 21:18:35 GMT
Bill Mitchell created SOLR-5521:

             Summary: MoreLikeThis component fails when item id is negative (begins with hyphen)
                 Key: SOLR-5521
             Project: Solr
          Issue Type: Bug
          Components: MoreLikeThis
    Affects Versions: 4.2.1
            Reporter: Bill Mitchell
            Priority: Minor

When the compared document's unique id is negative, the MoreLikeThis component fails to generate
a valid query to pass to each shard, as the generated query does not encapsulate the item's
negative id with quotes.  In our case, we are adding documents with a negative id as temporary
beans, used just for the MLT query, which will be deleted later.    

You can see this with a rather simple MLT query:

where the returned response shows:
<response><lst name="responseHeader"><int name="status">400</int><int
name="QTime">3</int><lst name="params"><str name="mlt.count">100</str><str
name="mlt.fl">text</str><str name="q">itemId:-1578997856</str><str
name="mlt">true</str></lst></lst><lst name="error"><str name="msg">
Cannot parse 'itemId:-1578997856': Encountered " "-" "- "" at line 1, column 7.
Was expecting one of:
    <BAREOPER> ...
    "(" ...
    "*" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    <REGEXPTERM> ...
    "[" ...
    "{" ...
    <LPARAMS> ...
    <NUMBER> ...
    </str><int name="code">400</int></lst></response>

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message