lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "phatak.prachi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SOLR-3466) org.apache.solr.common.SolrException: org.apache.lucene.queryParser.ParseException: Cannot parse
Date Thu, 17 May 2012 18:02:08 GMT
phatak.prachi created SOLR-3466:
-----------------------------------

             Summary: org.apache.solr.common.SolrException: org.apache.lucene.queryParser.ParseException:
Cannot parse
                 Key: SOLR-3466
                 URL: https://issues.apache.org/jira/browse/SOLR-3466
             Project: Solr
          Issue Type: Test
          Components: clients - java
            Reporter: phatak.prachi
            Priority: Blocker


My configuration
<fieldType name="textgen" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"
enablePositionIncrements="true" />
		<filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="15" side="front"/>
        <filter class="solr.LowerCaseFilterFactory"/>
		<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory" />
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true"
expand="true"/>
		<filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="15" side="front"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="stopwords.txt"
                enablePositionIncrements="true"
                />
		<filter class="solr.WordDelimiterFilterFactory" preserveOriginal="1" generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
		<filter class="solr.LowerCaseFilterFactory"/>
		<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>

Data:
Coke Product	Softdrink
Coke Product	Softdrink
Coke Product	Softdrink
Coke() Product	Softdrink
Pepsi Product	Softdrink
Pepsi Product	Softdrink
Other Product	Soft(drink)
Domestic-Beer	Beer-34333
Domestic-Beer	Beer-34333
Domestic-Beer	Beer
Domestic Beer	Beer
Import Beer+9	Beer
Import Beer	Beer
Import Beer	Beer
T-Shirt	Shirt
T-Shirt	Shirt
T-Shirt	Shirt
T-Shirt	Shirt-34333
T-Shirt	Shirt
Blouse	Women's-Wear
Blouse	Women's-Wear
Skirt%3	Women's Wear
Skirt	Women's Wear
Dress	Formal Wear


Whenever I search for Soft(, it gives me the following error and if try to search 34333, it
gives no results

SEVERE: org.apache.solr.common.SolrException: org.apache.lucene.queryParser.ParseException:
Cannot parse '+DIMENSION:Product^1.0 +( (SKU:soft(*^1.0 DIM_ATTR_ONE:soft(*^1.0 DIM_ATTR_
Was expecting one of:
    <AND> ...
    <OR> ...
    <NOT> ...
    "+" ...
    "-" ...
    "(" ...
    ")" ...
    "*" ...
    "^" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...

        at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:105)
        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:173)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1368)
        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.apache.lucene.queryParser.ParseException: Cannot parse '+DIMENSION:Product^1.0
+( (SKU:soft(*^1.0 DIM_ATTR_ONE:soft(*^1.0 DIM_ATTR_TWO:soft(*^1.0))': Encountered "<EO
Was expecting one of:
    <AND> ...
    <OR> ...
    <NOT> ...
    "+" ...
    "-" ...
    "(" ...
    ")" ...
    "*" ...
    "^" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...

        at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:211)
        at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:80)
        at org.apache.solr.search.QParser.getQuery(QParser.java:142)
        at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:81)
        ... 22 more
Caused by: org.apache.lucene.queryParser.ParseException: Encountered "<EOF>" at line
1, column 91.
Was expecting one of:
    <AND> ...
    <OR> ...
    <NOT> ...
    "+" ...
    "-" ...
    "(" ...
    ")" ...
    "*" ...
    "^" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...

        at org.apache.lucene.queryParser.QueryParser.generateParseException(QueryParser.java:1818)
        at org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser.java:1700)
        at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1314)
        at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1266)
        at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1313)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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