"Multiple points" error on fulltext search #177

Closed
therealplato opened this Issue Jul 24, 2013 · 4 comments

Projects

None yet

2 participants

@therealplato
Async callback of handlers.browseRests
Error:
{ [Error: multiple points]
  name: 'Error',
  scope: 'couch',
  status_code: 500,
  'status-code': 500,
  request:
   { method: 'GET',
     headers:
      { 'content-type': 'application/json',
        accept: 'application/json' },
     uri: 'http://localhost:5984/_fti/local/qzdb-test/_design/search/local_rests?q=lat%3Cdouble%3E%3A%5B42.7934626813465%20TO%2042.8114590.017996318653500536%5D%20AND%20lng%3Cdouble%3E%3A%5B-73.96417771584136%20TO%20-73.9396460.024531715841367294%5D&include_docs=true',
     jar: false,
     callback: [Function] },
  headers:
   { vary: 'Accept',
     date: 'Wed, 24 Jul 2013 20:26:24 GMT',
     'content-type': 'application/json; charset=utf-8',
     'cache-control': 'must-revalidate,no-cache,no-store',
     'status-code': 500,
     uri: 'http://localhost:5984/_fti/local/qzdb-test/_design/search/local_rests?q=lat%3Cdouble%3E%3A%5B42.7934626813465%20TO%2042.8114590.017996318653500536%5D%20AND%20lng%3Cdouble%3E%3A%5B-73.96417771584136%20TO%20-73.9396460.024531715841367294%5D&include_docs=true' },
  errid: 'non_200',
  reason: 'multiple points',
  code: 500,
  description: 'multiple points',
  stacktrace:
   [ 'Error: multiple points',
     '    at Request._callback (/home/plasma/project/nodecuizini/node_modules/nano/nano.js:298:39)',
     '    at Request.self.callback (/home/plasma/project/nodecuizini/node_modules/nano/node_modules/request/main.js:120:22)',
     '    at Request.EventEmitter.emit (events.js:96:17)',
     '    at Request.<anonymous> (/home/plasma/project/nodecuizini/node_modules/nano/node_modules/request/main.js:555:16)',
     '    at Request.EventEmitter.emit (events.js:93:17)',
     '    at IncomingMessage.<anonymous> (/home/plasma/project/nodecuizini/node_modules/nano/node_modules/request/main.js:517:14)',
     '    at IncomingMessage.EventEmitter.emit (events.js:123:20)',
     '    at IncomingMessage._emitEnd (http.js:371:10)',
     '    at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)' ] }
@therealplato

Java exception:

[plasma@plasma cuiz]$ 2013-07-24 17:36:09,112 ERROR [log] /local/qzdb-test/_design/search/local_rests
java.lang.NumberFormatException: multiple points
  at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1102)
  at java.lang.Double.parseDouble(Double.java:527)
  at com.github.rnewson.couchdb.lucene.couchdb.FieldType$2.toDouble(FieldType.java:77)
  at com.github.rnewson.couchdb.lucene.couchdb.FieldType$2.toRangeQuery(FieldType.java:65)
  at com.github.rnewson.couchdb.lucene.TypedField.toRangeQuery(TypedField.java:63)
  at com.github.rnewson.couchdb.lucene.CustomQueryParser.getRangeQuery(CustomQueryParser.java:125)
  at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1496)
  at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1319)
  at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1245)
  at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1234)
  at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
  at com.github.rnewson.couchdb.lucene.DatabaseIndexer$IndexState.parse(DatabaseIndexer.java:164)
  at com.github.rnewson.couchdb.lucene.DatabaseIndexer.search(DatabaseIndexer.java:520)
  at com.github.rnewson.couchdb.lucene.LuceneServlet.doGetInternal(LuceneServlet.java:198)
  at com.github.rnewson.couchdb.lucene.LuceneServlet.doGet(LuceneServlet.java:176)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1162)
  at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
  at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:155)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1153)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
  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:536)
  at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:913)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
  at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
  at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
@therealplato

I see I have two decimal points. I suspect I am accidentally adding a Number to a String.

@therealplato

Yeah, a simple cast to Number and my code is working fine.

I also found I had accidentally started a second Lucene instance so both were running, but that appears to have not been an issue.

@rnewson
Owner
rnewson commented Jul 24, 2013

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment