0
0
Fork 0
Commit Graph

11 Commits

Author SHA1 Message Date
Marty Schoch a16efa5e78 add experimental support for indexing/query geo points
New field type GeoPointField, or "geopoint" in mapping JSON.

Currently structs and maps are considered when a mapping explicitly
marks a field as type "geopoint".  Several variants of "lon", "lng", and "lat"
are looked for in map keys, struct field names, or method names.

New query type GeoBoundingBoxQuery searches for documents which have a
GeoPointField indexed with a value that is inside the specified bounding box.

New query type GeoDistanceQuery searches for documents which have a
GeoPointField indexed with a value that is less than or equal to the
specified distance from the specified location.

New sort by method "geo_distance".  Hits can be sorted by their distance
from the specified location.

New geo utility package with all routines ported from Lucene.

New FilteringSearcher, which wraps an existing Searcher, but filters
all hits with a user-provided callback.
2017-03-24 17:22:21 -07:00
Marty Schoch a5d1d7974c add query support for multi-phrase
when parsing json, when we encounter the key "terms", we first
try to parse as traditional phrase query, then if that fails,
we also try parsing it as multi-phrase
2017-02-10 16:46:38 -05:00
Marty Schoch 4e38c49287 move phrase search logic into phrase searcher
the logic of how a phrase search works should be an internal
detail of the phrase searcher.  further, these changes will
allow proper scoring of phrase matches, which require access
to the underlying searcher objects, which were hidden in the
previous approach.
2017-02-10 12:05:01 -05:00
Steve Yen 89a1cefde1 API change: optional SearchRequest.IncludeLocations flag
This is a change in search result behavior in that location
information is no longer provided by default with search results.

Although this looks like a wide-ranging change, it's mostly a
mechanical replacement of the explain bool flag with a new
search.SearcherOptions struct, which holds both the Explain bool flag
and the IncludeTermVectors bool flag.
2017-01-05 21:11:22 -08:00
Marty Schoch c927e124dd Merge branch 'master' of https://github.com/slavikm/bleve into slavikm-master4 2016-11-28 14:03:35 -05:00
Marty Schoch d372602f3c add support for parsing BoolFieldQuery from JSON
presence of the "bool" key triggers parsing as a BoolFieldQuery
fixes #498
2016-11-15 10:29:11 -05:00
slavikm 187d6013df Make sure getters follow the Go convention 2016-11-14 15:30:07 -08:00
slavikm 339ddbe0fa Added getters to boost and field query interfaces 2016-11-14 14:02:43 -08:00
Marty Schoch 2332455bd2 nicer formatting of license header 2016-10-02 10:13:14 -04:00
Marty Schoch a265218f76 heavier refactor of Query interface to simplify
Boostable, Fieldable, Validatable broken out into separate
interfaces.  This allows them to be discoverable when
needed, but ignorable otherwise.  The top-level bleve package
only every cares about Validatable and even that is optional.

Also, this change goes further to make the structure names
more reasonable, for cases where you're directly interacting
with the structures.
2016-09-29 14:54:16 -04:00
Marty Schoch 9ec2ddd757 initial refactor of query into separate package 2016-09-29 14:54:16 -04:00