You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Rajiv2 <ra...@gmail.com> on 2009/10/02 20:04:49 UTC

Lucene 2.9 Spatial Search Problem

Hello, I was using Lucene 2.4 and locallucene in my app and upgraded to
lucene 2.9 and I'm using the new spatial contrib package. I've switched
everything from using the locallucene specific classes to using the lucene
spation classes for indexing and searching.  Everything compiles but I'm the
following error during search: 

java.lang.NumberFormatException: Invalid shift value in prefixCoded string
(is encoded value really a LONG?)
	at
org.apache.lucene.util.NumericUtils.prefixCodedToLong(NumericUtils.java:206)
	at org.apache.lucene.search.FieldCache$10.parseDouble(FieldCache.java:294)
	at
org.apache.lucene.search.FieldCacheImpl$DoubleCache.createValue(FieldCacheImpl.java:619)
	at
org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:208)
	at
org.apache.lucene.search.FieldCacheImpl.getDoubles(FieldCacheImpl.java:586)
	at
org.apache.lucene.search.FieldCacheImpl$DoubleCache.createValue(FieldCacheImpl.java:609)
	at
org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:208)
	at
org.apache.lucene.search.FieldCacheImpl.getDoubles(FieldCacheImpl.java:592)
	at
org.apache.lucene.search.FieldCacheImpl.getDoubles(FieldCacheImpl.java:580)
	at
org.apache.lucene.spatial.tier.LatLongDistanceFilter.getDocIdSet(LatLongDistanceFilter.java:68)
	at
org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:272)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:253)

Does anyone have any clue as to what the problem might be?

-- 
View this message in context: http://www.nabble.com/Lucene-2.9-Spatial-Search-Problem-tp25719978p25719978.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


[ANN] VTD-XML 2.7

Posted by jimmy Zhang <cr...@comcast.net>.
VTD-XML 2.7 is released and can be downloaded at
http://sourceforge.net/projects/vtd-xml/files/

Below is a summary of what are the new features and enhancements.

Expanded VTD-XML's Core API

* VTDNav: toStringUpperCase, toStringLowerCase, contains(), endsWith(),
startsWith()
* Extended VTD added in-memory buffer support

Improved Xpath

* added the following XPath 2.0 functions: abs(), ends-with(), upper-case(),
lower-case()
* added support for variable reference
* significantly enhanced XPath syntax, checking error reporting (Special
thanks to Mark Swanson)
* Internal performance tuning

Bug fixes and Code Enhancement

* C version significantly removed warning message, fix memory leak during
Xpath expression parsing,
* Various bug fies (Special thanks to Jon Roberts, John Zhu, Matej Spiller,
Steve Polson, and Romain La Tellier) 


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


RE: Lucene 2.9 Spatial Search Problem

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hallo Rajiv2,

The LocalLucene from Sourceforge is not index-compatible to the recently
added spatial contrib in Lucene. You have to reindex your spatial values
(because the index format now makes use of the new Lucene 2.9 NumericField,
which is now the standard for numeric fields).

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Rajiv2 [mailto:rajiv.roopan@gmail.com]
> Sent: Friday, October 02, 2009 8:05 PM
> To: java-user@lucene.apache.org
> Subject: Lucene 2.9 Spatial Search Problem
> 
> 
> Hello, I was using Lucene 2.4 and locallucene in my app and upgraded to
> lucene 2.9 and I'm using the new spatial contrib package. I've switched
> everything from using the locallucene specific classes to using the lucene
> spation classes for indexing and searching.  Everything compiles but I'm
> the
> following error during search:
> 
> java.lang.NumberFormatException: Invalid shift value in prefixCoded string
> (is encoded value really a LONG?)
> 	at
> org.apache.lucene.util.NumericUtils.prefixCodedToLong(NumericUtils.java:20
> 6)
> 	at
> org.apache.lucene.search.FieldCache$10.parseDouble(FieldCache.java:294)
> 	at
> org.apache.lucene.search.FieldCacheImpl$DoubleCache.createValue(FieldCache
> Impl.java:619)
> 	at
> org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:208)
> 	at
> org.apache.lucene.search.FieldCacheImpl.getDoubles(FieldCacheImpl.java:586
> )
> 	at
> org.apache.lucene.search.FieldCacheImpl$DoubleCache.createValue(FieldCache
> Impl.java:609)
> 	at
> org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:208)
> 	at
> org.apache.lucene.search.FieldCacheImpl.getDoubles(FieldCacheImpl.java:592
> )
> 	at
> org.apache.lucene.search.FieldCacheImpl.getDoubles(FieldCacheImpl.java:580
> )
> 	at
> org.apache.lucene.spatial.tier.LatLongDistanceFilter.getDocIdSet(LatLongDi
> stanceFilter.java:68)
> 	at
> org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java
> :272)
> 	at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:253)
> 
> Does anyone have any clue as to what the problem might be?
> 
> --
> View this message in context: http://www.nabble.com/Lucene-2.9-Spatial-
> Search-Problem-tp25719978p25719978.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org



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


Re: Lucene 2.9 Spatial Search Problem

Posted by Michael McCandless <lu...@mikemccandless.com>.
The required format for contrib/spatial has changed to NumericField,
as of 2.9.  Are you building your index with NumericField?

Mike

On Fri, Oct 2, 2009 at 2:04 PM, Rajiv2 <ra...@gmail.com> wrote:
>
> Hello, I was using Lucene 2.4 and locallucene in my app and upgraded to
> lucene 2.9 and I'm using the new spatial contrib package. I've switched
> everything from using the locallucene specific classes to using the lucene
> spation classes for indexing and searching.  Everything compiles but I'm the
> following error during search:
>
> java.lang.NumberFormatException: Invalid shift value in prefixCoded string
> (is encoded value really a LONG?)
>        at
> org.apache.lucene.util.NumericUtils.prefixCodedToLong(NumericUtils.java:206)
>        at org.apache.lucene.search.FieldCache$10.parseDouble(FieldCache.java:294)
>        at
> org.apache.lucene.search.FieldCacheImpl$DoubleCache.createValue(FieldCacheImpl.java:619)
>        at
> org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:208)
>        at
> org.apache.lucene.search.FieldCacheImpl.getDoubles(FieldCacheImpl.java:586)
>        at
> org.apache.lucene.search.FieldCacheImpl$DoubleCache.createValue(FieldCacheImpl.java:609)
>        at
> org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:208)
>        at
> org.apache.lucene.search.FieldCacheImpl.getDoubles(FieldCacheImpl.java:592)
>        at
> org.apache.lucene.search.FieldCacheImpl.getDoubles(FieldCacheImpl.java:580)
>        at
> org.apache.lucene.spatial.tier.LatLongDistanceFilter.getDocIdSet(LatLongDistanceFilter.java:68)
>        at
> org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:272)
>        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:253)
>
> Does anyone have any clue as to what the problem might be?
>
> --
> View this message in context: http://www.nabble.com/Lucene-2.9-Spatial-Search-Problem-tp25719978p25719978.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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