eXist-db / documentation

Documentation of eXist
12 stars 44 forks source link

[lucene.xml]: #477

Open PietroLiuzzo opened 4 years ago

PietroLiuzzo commented 4 years ago

https://exist-db.slack.com/archives/CG2MRUZ35/p1589783299329600 Describe the problem the $options parameter in function ft:query takes either a map or XML apparently but the documentation and guidelines for additional parameters say it takes only XML, while the facets/fields $options have an example with a map, like map{facets:map{}}

I would suggest in this page to change to something like this

<para>The <code>ft:query</code> function allows a third parameter for passing additional
                settings to the query engine. This parameter must be an XML fragment which lists the
                configuration properties to be set as child elements:</para>
                settings to the query engine. This parameter can be a map or an XML fragment which
                lists the configuration properties to be set as child elements. Using a map will
                allow to include also options for facets and fields. The following is an example
                using XML and only with the additional parameters:</para>
welcome[bot] commented 4 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!

adamretter commented 4 years ago

Thanks for reporting @PietroLiuzzo. Would you be able to open a PR against one or both of:

  1. https://github.com/eXist-db/documentation/blob/master/src/main/xar-resources/data/indexing/indexing.xml
  2. https://github.com/eXist-db/exist/blob/develop/extensions/indexes/lucene/src/main/java/org/exist/xquery/modules/lucene/Query.java#L46
PietroLiuzzo commented 4 years ago

sure, I can try (fork and PR, right? not branch, because I have no writing permissions), but I am not sure what actions should be taken in the indexing.xml page, and I do not know what the Query.java file is at all... I would have minimally fixed only the lucene.xml

adamretter commented 4 years ago

Hi @PietroLiuzzo Yes a fork and PR.

Well I wasn't sure if it was the indexing.xml page you wanted to update or not? It corresponds to the documentation page - http://www.exist-db.org/exist/apps/doc/indexing.

Regards the Query.java file, near the top it defines the description of the ft:query function that you see in the eXist-db Function Docs. You don't need to actually understand the Java here, you can just edit the textual parts to change the description.