lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Tan" <luke....@cnet.com>
Subject RE: indexing null values?
Date Fri, 10 Aug 2007 03:53:40 GMT
Yonik,

Am I right to say that using a RangeFilter for this purpose might be
less efficient for large indexes than indexing as "__null__" since
RangeFilter uses TermEnum and TermDocs and iterates through every term
in the index?

Luke

-----Original Message-----
From: Pieter Berkel [mailto:pieter.berkel@gmail.com] 
Sent: Friday, August 10, 2007 10:08 AM
To: solr-dev@lucene.apache.org
Subject: Re: indexing null values?

On 10/08/07, Yonik Seeley <yonik@apache.org> wrote:

> I take that back... being able to specify open ends on the range query

> via the parser is also another Solr specific thing.
>


This is one of the reasons why we're moving from a custom-build Lucene
solution to Solr.


Wouldn't foo:"" work for a string (untokenized) field?
> For a tokenized field that typically eliminates whitespace, no zero 
> length strings would be indexed anyway.
>


Unfortunately the Lucene query parser doesn't accept empty string values
in the query string:

SEVERE: org.apache.lucene.queryParser.ParseException: Cannot parse
'article_type:""': Lexical error at line 1, column 16.  Encountered:
<EOF> after : "\"\""
        at
org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java
:153)
        at
org.apache.solr.search.QueryParsing.parseQuery(QueryParsing.java
:93)
        at
org.apache.solr.handler.StandardRequestHandler.handleRequestBody(
StandardRequestHandler.java:115)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(
RequestHandlerBase.java:78)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:723)
        at org.apache.solr.servlet.SolrDispatchFilter.execute(
SolrDispatchFilter.java:194)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
SolrDispatchFilter.java:162)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:151)
        at org.apache.coyote.http11.Http11Processor.process(
Http11Processor.java:870)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection
(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:81)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:619)

While it would be a useful feature to have, I'm not sure if it's worth
persuing the matter further.

Piete

Mime
View raw message