lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Rowe (JIRA)" <>
Subject [jira] Commented: (LUCENE-1137) Token type as BitSet: typeBits()
Date Wed, 16 Jan 2008 17:10:35 GMT


Steven Rowe commented on LUCENE-1137:

I see two problems with this patch:

1. Although in the patch you say that the "type bits" field added by the patch is completely
separate from the String type information, you don't name them with sufficiently different
names to distinguish them.

2. The information encoded by BitSet is a set of <int,boolean> tuples.  These are opaque
values.  In order for this to work, every tokenizer in the chain has to be aware of every
other one's use of these.  This makes sharing hard.

At a minimum, there should be some way to declare who's using what bit for what purpose -
maybe through a static hash table or something?

> Token type as BitSet: typeBits()
> --------------------------------
>                 Key: LUCENE-1137
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Analysis
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 2.4
>         Attachments: LUCENE-1137.patch
> It is sometimes useful to have a more compact, easy to parse, type representation for
Token than the current type() String.  This patch adds a BitSet onto Token, defaulting to
null, with accessors for setting bit flags on a Token.  This is useful for communicating information
about a token to TokenFilters further down the chain.  
> For example, in the WikipediaTokenizer, the possibility exists that a token could be
both a category and bold (or many other variations), yet it is difficult to communicate this
without adding in a lot of different Strings for type.  Unlike using the payload information
(which could serve this purpose), the BitSet does not get added to the index (although one
could easily convert it to a payload.)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message