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

Shai Erera commented on LUCENE-3998:
------------------------------------

These are not general utilities -- they are really example code that show how 
to index all sort of facet stuff. The examples generate some docs randomly, 
while other methods use example text as documents, and some predefined 
categories (with weights). Really, the examples package is meant to be whole in 
the sense that it comes with some example data, evaluation methods and example 
code.

Some facet tests just use these methods as convenient *test* utilities to index 
a bunch of documents, but that's it. Moving these utils into e.g. 
FacetTestUtils will remove them from the examples, which is not good. Keeping 
them there introduces a dependency on lucene-demo. So seems to me that we need 
to duplicate a lot of code just to avoid the dependency on lucene-demo, that 
exist anywhere for test purposes only.

Are there other modules with example code? If not, perhaps we should wait until 
we have some more modules with such examples, before we refactor things?

Another option would be to keep the examples in facet, but package them into 
lucene-demo/examples-4.0.0.jar. That way, someone can take the demo.jar, or the 
lucene-facet.jar. If he wants to run tests (why would he?), he'll need to put 
the lucene-demo in the classpath.
                
> facet module should have no dependencies, consolidate examples into demo/
> -------------------------------------------------------------------------
>
>                 Key: LUCENE-3998
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3998
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: modules/facet
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-3998.patch
>
>
> currently facets depends on analyzers-common, but this is unnecessary.
> additionally it has a nice examples/ package (even with javadocs! are they 
> actually seen anywhere?!),
> as well as tests for those examples.
> I think instead it would be better if facet/ had no dependencies,
> and if examples+examples tests were in demo/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to