lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Parker <godef...@gmail.com>
Subject Issue with documentation for org.apache.lucene.analysis.synonym.SynonymMap.Builder.add() method
Date Thu, 06 Sep 2012 17:52:00 GMT
I'm building documentation from the Lucene 4.0.0-BETA source (though
this was also an issue with the ALPHA source), and the output has null
characters in it. I believe that this is because the source looks like
this:

    /**
     * Add a phrase->phrase synonym mapping.
     * Phrases are character sequences where words are
     * separated with character zero (\u0000).  Empty words
     * (two \u0000s in a row) are not allowed in the input nor
     * the output!
     *
     * @param input input phrase
     * @param output output phrase
     * @param includeOrig true if the original should be included
     */

These \u0000 characters are converted to null (\0) characters in the
output, which are invalid in XML (I'm outputting XML). Indeed, this is
a problem in the built documentation at the Apache Lucene site
(http://lucene.apache.org/core/4_0_0-BETA/analyzers-common/org/apache/lucene/analysis/synonym/SynonymMap.Builder.html)
where the documentation looks like this (in my browser):

Add a phrase->phrase synonym mapping. Phrases are character sequences
where words are separated with character zero (). Empty words (two s
in a row) are not allowed in the input nor the output!

The actual HTML file does have null characters at the two locations,
which may be technically correct, but not very helpful. I believe the
"\u0000" in the source ought to be escaped in some way, so that
something more meaningful than \0 ends up in the output. I'd submit a
patch, just for the prestige of it, but I don't have the slightest
idea what the change should be, not being a Java guy at all.

For those interested in why I'm messing with this, then, I'm using
IKVM to convert the Java Lucene libraries to .NET assemblies (well,
one assembly) and converting the javadoc comments to XML documentation
for good IntelliSense in Visual Studio. It works wonderfully, and we
use it in very successful commercial software!

Note that I'm not subscribed to the list, so please CC me if there are
questions.

Mark

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


Mime
View raw message