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 host unknown <li...@hotmail.com> on 2003/02/17 15:31:20 UTC

RangeQuery Note

Hi All,

I've spent the weekend mulling over a problem I had with a RangeQuery over a 
Price field.  The problem was that prices can range from 1 to many digits 
(no cents, just dollars).  My searches were returning inconsistent results.  
After much debugging and playing around I found that 99 != 000099.  I've 
since converted all my prices to zero filled strings of length 8 and the 
searches are working properly.

Question/Comment:

Is this a bug in the sense that searching a range from 0 to 100 should 
return 99 (as opposed to 099)? if it isn't this might make a helpful note in 
the javadoc.

Have a great day,
Dominic
madison.com

P.S.
Feel free to add us to your list of happy Lucene users.  We're currently 
using Lucene for our archives search (www.madison.com/archives), currently 
building our classifieds search (www.madison.com/class), and will be 
expanding into a full site search as time permits.  Our archives are 
receiving nearly 1000 searches a day (It's only been live for a bit over a 
month now) and we've been receiving rave reviews about the speed and 
accuracy of the results sets.

Many Thanks





_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


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


Re: Indyo problem - log4j:WARN No appenders could be found for logger

Posted by Harun Altay <ha...@grids.ucs.indiana.edu>.
This seems to be a log4j problem. You may see the link below:

------------------------
http://jakarta.apache.org/log4j/docs/TROUBLESHOOT.html
log4j tells me to initialize properly.
Logging output is written to a target by using an appender. If no appenders
are attached to a category nor to any of its ancestors, you will get the
following message when trying to log:

log4j: No appenders could be found for category (some.category.name).
log4j: Please initialize the log4j system properly.
Log4j does not have a default logging target. It is the user's
responsibility to ensure that all categories can inherit an appender. This
can be easily achieved by attaching an appender to the root category.

-------------------------

Is it possible to use Indyo as it is? Do we have to do some further
configuration on log4j? If it is easy to do that, how can I do that?

Thanks
Harun.


----- Original Message -----
From: "Harun Altay" <ha...@grids.ucs.indiana.edu>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Monday, February 17, 2003 4:44 PM
Subject: Indyo problem - log4j:WARN No appenders could be found for logger


> Hi,
>
> I have a problem with Indyo. I have downloaded indyo from cvs, and
compiled
> it. I tried to run the code below, but it gives an exception.
>
> I look through the lucene user and developer archive, and I could not find
> any mail similar to this case. It may be a problem related to log4j, as
> well. Maybe something else. I want to learn what is the mistake here.
>
> Actually, if we have a ready-to-use jar file for indyo, it may be better,
> just like lucene or such other projects.
>
> Thanks,
> Harun.
>
>
> Source code is from:
> http://jakarta.apache.org/lucene/docs/lucene-sandbox/indyo/tutorial.html
> -----------------------------------------------------------------
>
> package lucene;
>
> import com.relevanz.indyo.*;
>
> public class Indyo {
>   public static void main(String[] args) {
>     try {
>       IndexDataSource ds = new FSDataSource("dir1");
>       IndyoIndexer indexer = new IndyoIndexer("indexPath4",
> "default.config.xml");
>       indexer.index(ds);
>     }
>     catch (Exception e) {
>       System.out.println("Exception : " + e);
>     }
>   }
> }
>
> Error:
> -----------------------------------------------------------------
>
> log4j:WARN No appenders could be found for logger
> (com.relevanz.indyo.SearchConfiguration).
> log4j:WARN Please initialize the log4j system properly.
>
> Exception : java.lang.NullPointerException
>
>
> -----------------------------------------------------------------
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


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


Indyo problem - log4j:WARN No appenders could be found for logger

Posted by Harun Altay <ha...@grids.ucs.indiana.edu>.
Hi,

I have a problem with Indyo. I have downloaded indyo from cvs, and compiled
it. I tried to run the code below, but it gives an exception.

I look through the lucene user and developer archive, and I could not find
any mail similar to this case. It may be a problem related to log4j, as
well. Maybe something else. I want to learn what is the mistake here.

Actually, if we have a ready-to-use jar file for indyo, it may be better,
just like lucene or such other projects.

Thanks,
Harun.


Source code is from:
http://jakarta.apache.org/lucene/docs/lucene-sandbox/indyo/tutorial.html
-----------------------------------------------------------------

package lucene;

import com.relevanz.indyo.*;

public class Indyo {
  public static void main(String[] args) {
    try {
      IndexDataSource ds = new FSDataSource("dir1");
      IndyoIndexer indexer = new IndyoIndexer("indexPath4",
"default.config.xml");
      indexer.index(ds);
    }
    catch (Exception e) {
      System.out.println("Exception : " + e);
    }
  }
}

Error:
-----------------------------------------------------------------

log4j:WARN No appenders could be found for logger
(com.relevanz.indyo.SearchConfiguration).
log4j:WARN Please initialize the log4j system properly.

Exception : java.lang.NullPointerException


-----------------------------------------------------------------







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


Re: RangeQuery Note

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hello,

Padding with zeros is the way it's supposed to work (i.e. not a bug
although not intuitive), since Lucene is comparing terms
lexiocographically.

Otis
P.S.
To be included in the list on the Powered by Lucene page you need to
display the clickable Lucene logo on your search results pages.

--- host unknown <li...@hotmail.com> wrote:
> Hi All,
> 
> I've spent the weekend mulling over a problem I had with a RangeQuery
> over a 
> Price field.  The problem was that prices can range from 1 to many
> digits 
> (no cents, just dollars).  My searches were returning inconsistent
> results.  
> After much debugging and playing around I found that 99 != 000099. 
> I've 
> since converted all my prices to zero filled strings of length 8 and
> the 
> searches are working properly.
> 
> Question/Comment:
> 
> Is this a bug in the sense that searching a range from 0 to 100
> should 
> return 99 (as opposed to 099)? if it isn't this might make a helpful
> note in 
> the javadoc.
> 
> Have a great day,
> Dominic
> madison.com
> 
> P.S.
> Feel free to add us to your list of happy Lucene users.  We're
> currently 
> using Lucene for our archives search (www.madison.com/archives),
> currently 
> building our classifieds search (www.madison.com/class), and will be 
> expanding into a full site search as time permits.  Our archives are 
> receiving nearly 1000 searches a day (It's only been live for a bit
> over a 
> month now) and we've been receiving rave reviews about the speed and 
> accuracy of the results sets.
> 
> Many Thanks
> 
> 
> 
> 
> 
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
> http://join.msn.com/?page=features/featuredemail
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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