PLucene minimum for indexing?

A

afrinspray

I'm indexing message board postings with Plucene, but I'm having
trouble indexing rows that are small. In my system, each message has a
user id associated with it, but searching with a query like
"intUserID:'132'" never works. I can however search both the subject
and the body. Is the ID too small to be indexed?

Here's an abbreviate example of my indexing code:

$objIndex = Plucene::Index::Writer->new(
$strIndexFilename,
Plucene::plugin::Analyzer::porterAnalyzer->new(),
$intNewIndex
);
my $objDoc = Plucene::Document->new();

$objDoc->add(Plucene::Document::Field->Keyword("pkPostID" =>
$pkPostID)); # Never searched.
$objDoc->add(Plucene::Document::Field->Text("intFromID" =>
$intFromID)); # Not searchable?!
$objDoc->add(Plucene::Document::Field->Text("strPostSubject" =>
$strPostSubject)); # Searchable and returned on match
$objDoc->add(Plucene::Document::Field->UnStored("strPostContents" =>
$strPostContents)); # Searchable but never returned (can be large)

$objIndex->add_document($objDoc);


Thanks in advance,
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top