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:lugin::Analyzer:orterAnalyzer->new(),
$intNewIndex
);
my $objDoc = Plucene:ocument->new();
$objDoc->add(Plucene:ocument::Field->Keyword("pkPostID" =>
$pkPostID)); # Never searched.
$objDoc->add(Plucene:ocument::Field->Text("intFromID" =>
$intFromID)); # Not searchable?!
$objDoc->add(Plucene:ocument::Field->Text("strPostSubject" =>
$strPostSubject)); # Searchable and returned on match
$objDoc->add(Plucene:ocument::Field->UnStored("strPostContents" =>
$strPostContents)); # Searchable but never returned (can be large)
$objIndex->add_document($objDoc);
Thanks in advance,
Mike
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:lugin::Analyzer:orterAnalyzer->new(),
$intNewIndex
);
my $objDoc = Plucene:ocument->new();
$objDoc->add(Plucene:ocument::Field->Keyword("pkPostID" =>
$pkPostID)); # Never searched.
$objDoc->add(Plucene:ocument::Field->Text("intFromID" =>
$intFromID)); # Not searchable?!
$objDoc->add(Plucene:ocument::Field->Text("strPostSubject" =>
$strPostSubject)); # Searchable and returned on match
$objDoc->add(Plucene:ocument::Field->UnStored("strPostContents" =>
$strPostContents)); # Searchable but never returned (can be large)
$objIndex->add_document($objDoc);
Thanks in advance,
Mike