FAQ
Hi all,
I'm using Lucandra to index notes in our system. Since we can't use
numeric fields due to a bug in Cassandra (fixed in 0.7), I'm encoding
all times a epoch in Hex, then storing the hex string. I have the
following fields on my document.

createdDate
phoneNumber
email


I want to perform a query where the input is either a phone number, or
an email. The user also passes in an epoch timestamp (long in
milliseconds), and the count. I need to return all documents with a
timestamp <= the given timestamp, and the maximum count. I'm having
some trouble building this query in my code. I never get any results,
but I can see the data is written to the index properly. Here is my
code.

http://pastie.org/private/xzvnntmyjzxgpjgctxftrq



Thanks,
Todd

Search Discussions

  • Ian Lea at Sep 17, 2010 at 8:37 am
    From a quick look your code looks fine, but there are various possible
    reasons why you might not be getting the results you expect.
    http://wiki.apache.org/lucene-java/LuceneFAQ#Why_am_I_getting_no_hits_.2BAC8_incorrect_hits.3F

    Are the email and phone numbers stored as is, or analyzed? Does it
    work if you remove the date filter? Are the hex encoded strings the
    same length and in the right sequence?

    Posting a complete standalone test case or program, as small as you
    can make it while demonstrating the problem, can make it easier for
    people to spot problems.


    --
    Ian.

    On Fri, Sep 17, 2010 at 3:39 AM, Todd Nine wrote:
    Hi all,
    I'm using Lucandra to index notes in our system.  Since we can't use
    numeric fields due to a bug in Cassandra (fixed in 0.7), I'm encoding
    all times a epoch in Hex, then storing the hex string.  I have the
    following fields on my document.

    createdDate
    phoneNumber
    email


    I want to perform a query where the input is either a phone number, or
    an email.  The user also passes in an epoch timestamp (long in
    milliseconds), and the count.  I need to return all documents with a
    timestamp <= the given timestamp, and the maximum count.  I'm having
    some trouble building this query in my code.  I never get any results,
    but I can see the data is written to the index properly.  Here is my
    code.

    http://pastie.org/private/xzvnntmyjzxgpjgctxftrq



    Thanks,
    Todd



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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedSep 17, '10 at 2:39a
activeSep 17, '10 at 8:37a
posts2
users2
websitelucene.apache.org

2 users in discussion

Ian Lea: 1 post Todd Nine: 1 post

People

Translate

site design / logo © 2022 Grokbase