On 03/09/14 11:07, Osma Suominen wrote:
Hi!

Any interest in my contribution? Anything I can do to help get this, or
something like it, into jena-text?

Yes - it looks interesting.

What would be helpful would be:

1/ Create JIRA and attach the patch (it's less likely to get lost!)
   You can assign it to me.  I have just checked the patch applies OK
   for me.

2/ Is there any documentation updates to go with this for:

http://jena.apache.org/documentation/query/text-query.html

whose source is in markdown at:

https://svn.apache.org/repos/asf/jena/site/trunk/content/documentation/query/text-query.mdtext

        Andy


-Osma

01.09.2014, 15:38, Osma Suominen kirjoitti:
Hi!

I liked the option to specify Analyzer for jena-text, as implemented in
JENA-654. But I'd like to use an analyzer that is otherwise like
KeywordAnalyzer but case-insensitive, for use in an
autocomplete/typeahead UI widget. Lucene doesn't include such an
analyzer, but there are several implementations of the same idea, e.g.
in neo4j [1] and stargate [2].

I created my own implementation of such an analyzer and added code to
use it from the assembler. Patch attached.

This analyzer is now in a new package
org.apache.jena.query.text.analyzer, in case other analyzers for
jena-text will appear in the future. If you don't like the new package,
the class can of course be moved to org.apache.jena.query.text.

I also added a test for case-insensitivity. To avoid lots of duplicate
boilerplate code, I slightly modified and subclassed the existing test
for KeywordAnalyzer.

I'd love to see this in the next version of jena-text and Fuseki. Of
course I'll rework the patch if necessary. I can also tweak the web
documentation to mention this analyzer.

-Osma


[1]
https://github.com/apatry/neo4j-lucene4-index/blob/master/src/main/java/org/neo4j/index/impl/lucene/LowerCaseKeywordAnalyzer.java



[2]
https://github.com/tuplejump/stargate-core/blob/master/src/main/java/com/tuplejump/stargate/lucene/CaseInsensitiveKeywordAnalyzer.java






Reply via email to