Full-text search package? (CSOTD included!)

goran.hultgren at bluefish.se goran.hultgren at bluefish.se
Wed Jan 23 09:35:31 UTC 2002


Scott A Crosby <crosby at qwes.math.cmu.edu> wrote:
[BIG SNIP]
> Does this sound sufficient for your needs, specifically, the restricted
> query language and the database-size limitations.
>
> Scott

I want/need this too! :-)

My advice would be to start off like you described and then, when it
works, we can always retrofit it with persistence, tune the hell out of
it etc. etc. :-)

And about BerkeleyDB - if you want to test that route, talk to Stephen
Pair, he has interfaced it to Squeak.

regards, Göran

<CSOTD>"This snipped is a bit large. I have started playing with Image
Segments
and they are nice. This code snippet extracts an ImageSegment,
writes it to file, counts stubs left behind and installs the segment
back.
Inspect or print it to see some interesting info about it all. Change
selfContainedObjectToPlayWith to whatever you like."

| is report extractTime writeTime nrOfStubs installTime |
selfContainedObjectToPlayWith _ 'aString'. "Put what you like here"
extractTime _ Time millisecondsToRun: [
		is _ ImageSegment new.
		is copyFromRoots: (Array with: selfContainedObjectToPlayWith)
sizeHint: 100000 areUnique: true.
		is segmentName: 'segmenttest' ].
report _ String streamContents: [:stream | is printSpaceAnalysisOn:
stream ].
writeTime _ Time millisecondsToRun: [ is extract; writeToFile ].
nrOfStubs _ (ImageSegmentRootStub allInstances collect: [:stub | stub
xxxSegment = is ]) size.
installTime _ Time millisecondsToRun: [ is install ].
'Extract time: ', extractTime printString, ' ms
Write to file time: ', writeTime printString, ' ms (includes one full GC
I think at about 500 ms that has been removed in newer Squeak)
Install time: ', installTime printString, ' ms
Number of stubs after extract: ', nrOfStubs printString,'
Analysis: ', report
</CSOTD>



More information about the Squeak-dev mailing list