Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for field_masking_span query #20293

Closed
russcam opened this issue Sep 2, 2016 · 13 comments
Closed

Documentation for field_masking_span query #20293

russcam opened this issue Sep 2, 2016 · 13 comments
Labels
>docs General docs changes :Search/Search Search-related issues that do not fall into other categories

Comments

@russcam
Copy link
Contributor

russcam commented Sep 2, 2016

It looks like field_masking_span query has been supported for a long time but remains undocumented.

It should be included in the documentation for the latest 1.x, 2.x and 5.x releases.

@russcam
Copy link
Contributor Author

russcam commented Sep 2, 2016

See elastic/elasticsearch-net#2231

@clintongormley clintongormley added >docs General docs changes help wanted adoptme discuss :Query DSL and removed help wanted adoptme labels Sep 2, 2016
@clintongormley
Copy link
Contributor

I'm actually wondering if we should remove the field_masking_span query, which seems like it is a poor man's nested, but relying on term positions in different fields (see https://lucene.apache.org/core/2_9_4/api/core/org/apache/lucene/search/spans/FieldMaskingSpanQuery.html)

@yevhen
Copy link
Contributor

yevhen commented Sep 2, 2016

@clintongormley could you please elaborate more on this? We are using 2 separate fields to analyze the same content with morphology and exact. The positions are completely equal in both fields so we can safely use FieldMaskngQuery, and we don't need scoring at this point. How would nested help us in this case? Thanks!

@clintongormley
Copy link
Contributor

@yevhen ok i may have misunderstood the use cases. my understanding was that it was a workaround for multiple corresponding values in each field, eg:

{
  "users": [ 
   { "first_name": "john", "last_name": "smith" },
   { "first_name": "jack", "last_name": "white" },
  ]
}

which ends up being indexed as:

users.first_name: john, jack
users.last_name: smith, white

Nested solves this use case in a much better way.

If field_masking_span query has other use cases, then I'm happy to leave it there.

Given that you're using it, any chance you could send a PR adding the docs? (as I clearly don't understand the use case properly)

@yevhen
Copy link
Contributor

yevhen commented Sep 5, 2016

@clintongormley sure, no problem. Where to add docs? I'm new to repo structure ...

@yevhen
Copy link
Contributor

yevhen commented Sep 6, 2016

@clintongormley ping :)

@russcam
Copy link
Contributor Author

russcam commented Sep 6, 2016

@yevhen The documentation is built with the asciidoc build process in the docs repo. The source for the master branch of the elasticsearch docs is in
https://github.com/elastic/elasticsearch/tree/master/docs/reference, with the span queries living in https://github.com/elastic/elasticsearch/tree/master/docs/reference/query-dsl.

Once an asciidoc file is added for field_masking_span in the query-dsl directory, a link to it should be added to the span-queries.asciidoc file.

yevhen added a commit to youscan/elasticsearch that referenced this issue Sep 8, 2016
@yevhen
Copy link
Contributor

yevhen commented Sep 8, 2016

@russcam done

@clintongormley
Copy link
Contributor

@yevhen i don't see a pull request for this in our repo? Did you create one?

@yevhen
Copy link
Contributor

yevhen commented Sep 8, 2016

@russcam but isn't the current PR is not the right one? :)

I did the commit youscan@d51ade7 which you can see referenced by the current PR (#20293)

@yevhen
Copy link
Contributor

yevhen commented Sep 8, 2016

Should I make a separate PR?

@russcam
Copy link
Contributor Author

russcam commented Sep 8, 2016

@yevhen You've referenced this issue but would you be able to open a PR with your change, referencing this issue?

@yevhen
Copy link
Contributor

yevhen commented Sep 8, 2016

this #20395

clintongormley pushed a commit that referenced this issue Sep 13, 2016
* Documentation for field_masking_span query. Fixes #20293

* After review fixes
clintongormley pushed a commit that referenced this issue Sep 13, 2016
* Documentation for field_masking_span query. Fixes #20293

* After review fixes
clintongormley pushed a commit that referenced this issue Sep 13, 2016
* Documentation for field_masking_span query. Fixes #20293

* After review fixes
clintongormley pushed a commit that referenced this issue Sep 13, 2016
* Documentation for field_masking_span query. Fixes #20293

* After review fixes
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

3 participants