a failing test was producing unhelpful pointer addresses as
the only debug output. this changes the output to print
the terms and locations as readable text
part of #629
the implementation of the doc id search requires that the list
of ids be sorted. however, when doing a multisearch across
many indexes at once, the list of doc ids in the query is shared.
deeper in the implementation, the search of each shard attempts
to sort this list, resulting in a data race.
this is one example of a potentially larger problem, however
it has been decided to fix this data race, even though larger
issues of data owernship may remain unresolved.
this fix makes a copy of the list of doc ids, just prior to
sorting the list. subsequently, all use of the list is on the
copy that was made, not the original.
fixes#518
previously the query string queries were modified to aid in
compatibility with other search systems. this change:
f391b991c2
has a problem when combined with:
77101ae424
due to the introduction of MatchNoneSearchers being returned
in a case where previously they never would.
the fix for now is to simply return disjunction queries on 0
terms instead. this ultimately also matches nothing, but avoids
triggering the logic which handles match none searchers in a
special way.
We recenlty introduced support for indexing the content of
things implementing TextMarshaler. Since often times interfaces
are implemented via pointer receivers, we added support to
introspect pointers (previously we just dereferenceed them and
traversed into their underlying structs). However, in doing so
we neglected to consider the case where the pointer does
implement the interface we care about, but happens to be nil.
fixes#603
previously, all numeric terms required to implement a numeric
range search were passed to the disjunction query (possibly
exceeding the disjunction clause limit)
now, after producing the list of terms, we filter them against
the terms which actually exist in the term dictionary. the
theory is that this will often greatly reduce the number of terms
and therefore reduce the likelihood that you would run into the
disjunction term limit in practice.
because the term dictionary interface does not have a seek API
and we're reluctant to add that now, i chose to do a binary
search of the terms, which either finds the term, or not. then
subsequent binary searches can proceed from that position,
since both the list of terms and the term dictionary are sorted.
Many existing structs already have a Type field or method which
conflicts with the bleve Classifier interface. To address this
without breaking existing applications, we introduce an
alternate BleveType() method which will be checked first. The
interface describing this method is private, as it should never
need to be referenced outside this package.
fixes#283
Sometimes you have structs which contain data which isn't
exported, or for which the correct data to index isn't just the
contents of it's exported fields. In these cases your struct
can implement TextMarshaler to return a suitable text
representation.
Previously bleve did not recognize this interface and do anything
to use it. Now, if the field containing such a struct is
explicitly mapped as "text" and if the struct (or pointer to it)
implements TextMarshaler, we index a text field with the
contents returned by MarshalText().
For backwards compatibilty, dynamic mappings will never use
this feature, and will continue to traverse into the struct
and index the exported fields directly.
fixes#281
if min and max are the same term
and the term is in dictionary
and both in and max are set to exclusive
then we would panic attempting to access element -1 of a slice.
now, after trimming the slice, we recheck that the length is > 0
this introduces a new light Spanish stemmer
and move the other pure Go Spanish analysis components back
in from the blevex package
the libstemmer version of the stemmer will remain in blevex
this introduces new German light stemmer
and moves the other pure Go german analysis components back
in from the blevex package
the libstemmer version of the stemmer will remain in blevex
there was a bug where if the circle described by the point
distance query crossed the poles, then we incorrectly built
a box around it. this resulted in incorrect searh results.