On commenting
//config.setIndexFieldName(CITY, city); at search time, this is before
i do, getTopChildren(...)
I get following exception.
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
at
org.apache.lucene.facet.taxonomy.FastTaxonomyFacetCounts.count(FastTaxonomyFacetCounts.java:74)
FacetsConfig Object is same.
(indexConfig == searchConfig) returns true.
On Sat, Jun 21, 2014 at 11:01 PM, Shai Erera ser...@gmail.com wrote:
If you can, while in debug mode try to note the instance ID of the
FacetsConfig, and assert it is indeed the same (i.e. indexConfig ==
searchConfig).
Thanks very much for help.
Ok, so i believe my rest of the code is correct, i just need to
Initialize a FacetsCounts per indexFieldName
How do i do this, is there some TestCase, or some sample code available ?
Thanks,
On Sun, Jun 22, 2014 at 10:05 PM, Shai Erera ser...@gmail.com wrote:
There is no sample code for doing that but it's quite straightforward - if
you know you indexed some dimensions under different indexFieldNames,
initialize a FacetCounts per such field name, e.g.:
FastTaxoFacetCounts defaultCounts = new FastTaxoFacetCounts(...); // for
your regular facets
Thanks this worked for me :)
Is there any advantage of indexing some facets as not providing any
indexFieldName ?
Thanks
On Mon, Jun 23, 2014 at 12:55 PM, Shai Erera ser...@gmail.com wrote:
There is no sample code for doing that but it's quite straightforward - if
you know you indexed
Basically, it's not very common to change the indexFieldName. You should do
that in case you e.g. count facets in groups of dimensions, rather than
counting all of them. So for example, if you have 20 dimensions, but you
know you only count d1-d5, d6-d12 and d13-d20, then if you separate them to
3
Thanks very much for this valuable information.
Good to know that, same indexFieldName can be used for multiple (similar in
some cases) dimensions.
For sure this will help me to design application better.
Thanks once again.
On Mon, Jun 23, 2014 at 7:00 PM, Shai Erera ser...@gmail.com wrote:
I will try to dig more on your suggestions, and also assert FacetsConfig
object.
While debugging i found, buildFacetsResult(...) method from
DrillSideways.java
Its internally invoking following constructor from
FastTaxonomyFacetCounts.java
FastTaxonomyFacetCounts() {
Are you sure it's the same FacetsConfig at search time? Because the
exception implies your CITY field didn't have
config.setIndexFieldName(CITY, city) called.
Or, can you try commenting out 'config.setIndexFieldName(CITY,
city)' at index time and see if the exception still happens?
Mike
If you can, while in debug mode try to note the instance ID of the
FacetsConfig, and assert it is indeed the same (i.e. indexConfig ==
searchConfig).
Shai
On Sat, Jun 21, 2014 at 8:26 PM, Michael McCandless
luc...@mikemccandless.com wrote:
Are you sure it's the same FacetsConfig at search
Hello,
I am getting below exception, and using Drillsideways facets. While getting
children i am getting below exception:
17:02:10,496 ERROR [stderr:71] (Thread-2
(HornetQ-client-global-threads-790878673))
java.lang.IllegalArgumentException: dimension CITY was not indexed into
field $facets
How do you add facets to your documents? Did you play with the
FacetsConfig, such as alter the field under which the CITY dimension is
indexed?
If you can reproduce this failure in a simple program, I guess it will be
easy to spot the error. Looks like a configuration error to me...
Shai
On
Thanks for helping me.
Yes, i did couple of things:
Below is simple code for indexing which i use.
TrackingIndexWriter nrtWriter
DirectoryTaxonomyWriter taxoWriter = ...
FacetsConfig config = new FacetConfig();
config.setHierarchical(CITY, true)
config.setMultiValued(CITY, true);
13 matches
Mail list logo