lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-3807) Cleanup suggester API
Date Fri, 02 Mar 2012 10:24:58 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-3807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Simon Willnauer updated LUCENE-3807:
------------------------------------

    Attachment: LUCENE-3807.patch

following up on this, here is another patch. 
I cleaned up the APIs even further removing get / add from Lookup which is not really used.
TST and Jaspell still support add and get is still implemented on all others but its not part
of the interface. The main thing that buggs me with add is that its inconsistent with build
since it allows arbitrary output while build uses a Number. 
Once we need this we can add it back to the interface. 

TST and Jaspell are now optimized to not necessarily create new Float objects all the time
but share instances if the incoming weight allows it. I also create Number instances based
on the range which might safe some more memory while minor IMO.

LookupResult now also returns a long instead of a float to be consistent with the TermFreqIterator.

SortedTermFreqIteratorWrapper is now based on the On-Disk sort. I extended the sorter impl
a little to work with Comparator<BytesRef> and fixed the TODO by using BytesRefList
with ByteBlockPool internally. WFSTCompletionLookup now also uses the SortedTFIteratorWrapper
to remove duplicated code.
                
> Cleanup suggester API
> ---------------------
>
>                 Key: LUCENE-3807
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3807
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/other
>    Affects Versions: 3.6, 4.0
>            Reporter: Simon Willnauer
>             Fix For: 4.0
>
>         Attachments: LUCENE-3807.patch, LUCENE-3807.patch, LUCENE-3807.patch, LUCENE-3807.patch,
LUCENE-3807.patch
>
>
> Currently the suggester api and especially TermFreqIterator don't play that nice with
BytesRef and other paradigms we use in lucene, further the java iterator pattern isn't that
useful when it gets to work with TermsEnum, BytesRef etc. We should try to clean up this api
step by step moving over to BytesRef including the Lookup class and its interface...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message