lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3998) facet module should have no dependencies, consolidate examples into demo/
Date Thu, 19 Apr 2012 06:13:44 GMT


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:
>             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
> 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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message