[ 
https://issues.apache.org/jira/browse/JENA-654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13945151#comment-13945151
 ] 

Andy Seaborne edited comment on JENA-654 at 3/24/14 4:07 PM:
-------------------------------------------------------------

I have a patch that adds the ability to configure a text analyzer on a text 
field.  There is support for three kinds of analyzer, SimpleAnalyzer, 
KeywordAnalyzer and StandardAnalyzer with an option list of stop words.

To configure, for example a standard analyzer with a stop word list:
{noformat}
 text:map (
         [ text:field "text" ; 
           text:predicate rdfs:label;
           text:analyzer [
               a  lucene:StandardAnalyzer ;
               text:stopWords ("foo" "bar" "baz") # optional
           ]
         ]
{noformat}
The property {{text:analyzer}} specifies the analyzer for a field. The value of 
that property is a node representing the analyzer.  That nodes has an rdf:type 
property specifying the type of the analyzer.  Other properties may specify 
other configuration options.



was (Author: bwm):
I have a patch that adds the ability to configure a text analyzer on a text 
field.  There is support for three kinds of analyzer, SimpleAnalyzer, 
KeywordAnalyzer and StandardAnalyzer with an option list of stop words.

To configure, for example a standard analyzer with a stop word list:

 text:map (
         [ text:field "text" ; 
           text:predicate rdfs:label;
           text:analyzer [
               a  lucene:StandardAnalyzer ;
               text:stopWords ("foo" "bar" "baz") # optional
           ]
         ]

The property text:analyzer specifies the analyzer for a field. The value of 
that property is a node representing the analyzer.  That nodes has an rdf:type 
property specifying the type of the analyzer.  Other properties may specify 
other configuration options.


> Enable jenatext to set the analyzer of a field.
> -----------------------------------------------
>
>                 Key: JENA-654
>                 URL: https://issues.apache.org/jira/browse/JENA-654
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: Text
>            Reporter: Brian McBride
>            Priority: Minor
>         Attachments: 
> 0001-Added-configuration-of-text-analyzers-for-lucene-tex.patch, 
> 0002-Added-configuration-of-Keyword-analyzer.patch
>
>
> This issue was raised by Paul Tyson [1]
> The specific request is to be able to specify that a field should by analysed 
> using Lucene's KeywordAnalyzer, though it is obvious that may generalized to 
> specifying any analyzer.
> [1] 
> http://mail-archives.apache.org/mod_mbox/jena-users/201403.mbox/%3C1394758305.5948.14.camel%40tristan%3E



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to