Chris,
> +It is up to the writer of CLASSNAME to arrange that the `Document`s
> +that it constructs have the required multiple fields. See the
> +project https://github.com/epimorphics/ppd-text-index for an
> +example.
There shouldn't be references to an external example that is not being
contributed because it may change, or go away, over time and that's up
to epimorphics. Jena needs to insulate itself from that possibility.
Could the example be changed to use a very simple textDocProducer?
Maybe:
1/ the default textDocProducer in jena-text (TextDocProducerTriples)
written explicitly.
2/ An example class on the page that inherits from
TextDocProducerTriples and does some trivial action like choose to call
super.change if the indexable string is, say, over 6 characters? (it
does not have to useful, just short code).
Andy
On 20/03/15 12:20, Chris Dollin wrote:
Clone URL (Committers only):
https://cms.apache.org/redirect?new=anonymous;action=diff;uri=http://jena.apache.org/documentation%2Fquery%2Ftext-query.mdtext
Chris Dollin
Index: trunk/content/documentation/query/text-query.mdtext
===================================================================
--- trunk/content/documentation/query/text-query.mdtext (revision 1655891)
+++ trunk/content/documentation/query/text-query.mdtext (working copy)
@@ -417,4 +417,33 @@
</dependency>
adjusting the version <code>X.Y.Z</code> as necessary. This will
automatically
-include a compatible version of Lucene and the Solr java client, but not Solr
server.
\ No newline at end of file
+include a compatible version of Lucene and the Solr java client, but not Solr
server.
+
+# Configuring Alternative TextDocProducers
+
+Common RDF use has one field, mapping a property to a text index field.
+To have multiple fields, useful to *eg* conjunctive query, requires
+writing and configuring an alternative 'TextDocProducer'.
+
+To configure a `TextDocProducer` `MyProducer` in a dataset assembly,
+use the property `textDocProducer`, eg:
+
+ <#ds-with-lucene> rdf:type text:TextDataset;
+ text:dataset <#ds> ;
+ text:index <#indexLucene> ;
+ text:textDocProducer <java:CLASSNAME> ;
+ .
+
+where CLASSNAME is the `TextDocProducer` class; it must have either
+a single-argument constructor of type `TextIndex`, or a two-argument
+constructor `(DatasetGraph, TextIndex)`. The `TextIndex` argument
+will be the configured text index, and the `DatasetGraph` argument
+will be the graph of the configured dataset.
+
+It is up to the writer of CLASSNAME to arrange that the `Document`s
+that it constructs have the required multiple fields. See the
+project https://github.com/epimorphics/ppd-text-index for an
+example.
+
+
+