TermsEnum and Trie Int

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

TermsEnum and Trie Int

Joel Bernstein
Hi,

I wrote some code that iterates through an int field terms using a TermsEnum and it works great.

Tried the same code on a Trie Int, precision step 8 field and the code no longer works properly, because of the precision step terms in the index.

How can I distinguish between the original term and the precision step terms while iterating through the TermsEnum?

Thanks,
Joel

Reply | Threaded
Open this post in threaded view
|

Re: TermsEnum and Trie Int

Yonik Seeley-4
UnInvertedField does this...
    final String prefix =
TrieField.getMainValuePrefix(searcher.getSchema().getFieldType(field));

-Yonik
http://lucidworks.com


On Mon, Sep 9, 2013 at 5:35 PM, Joel Bernstein <[hidden email]> wrote:

> Hi,
>
> I wrote some code that iterates through an int field terms using a TermsEnum
> and it works great.
>
> Tried the same code on a Trie Int, precision step 8 field and the code no
> longer works properly, because of the precision step terms in the index.
>
> How can I distinguish between the original term and the precision step terms
> while iterating through the TermsEnum?
>
> Thanks,
> Joel
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: TermsEnum and Trie Int

Joel Bernstein
thanks!


On Mon, Sep 9, 2013 at 6:17 PM, Yonik Seeley <[hidden email]> wrote:
UnInvertedField does this...
    final String prefix =
TrieField.getMainValuePrefix(searcher.getSchema().getFieldType(field));

-Yonik
http://lucidworks.com


On Mon, Sep 9, 2013 at 5:35 PM, Joel Bernstein <[hidden email]> wrote:
> Hi,
>
> I wrote some code that iterates through an int field terms using a TermsEnum
> and it works great.
>
> Tried the same code on a Trie Int, precision step 8 field and the code no
> longer works properly, because of the precision step terms in the index.
>
> How can I distinguish between the original term and the precision step terms
> while iterating through the TermsEnum?
>
> Thanks,
> Joel
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
Joel Bernstein
Professional Services LucidWorks