Skip to content
24 changes: 22 additions & 2 deletions docs/reference/glossary.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@
`object`. The mapping also allows you to define (amongst other things)
how the value for a field should be analyzed.

[[glossary-filter]] filter ::

A filter is a non-scoring <<glossary-query,query>>, meaning that it does not score documents.
It is only concerned about answering the question - "Does this document match?".
The answer is always a simple, binary yes or no. This kind of query is said to be made
in a https://www.elastic.co/guide/en/elasticsearch/guide/current/_queries_and_filters.html[filter context],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I see your problem now.
You are trying to link to a page in the elasticsearch guide, which only seems to work with an external link syntax. What I said earlier was to please use an "Internal cross references" as described in the asciidoc syntax above to point to this document in the reference itself, which works because of its inline anchor in the first line. You should be able to use <<query-filter-context,filter context>> for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried even this <<query_filter_context.asciidoc,filter context>> before, now again, it is not working. It only works if both the linked and linking documents are in the same folder. Here we have docs/reference/glossary.asciidoc linking to docs/reference/query-dsl/query_filter_context.asciidoc. I found this issue on asciidoctor repo but I could not make anything of it. I tried the follow with no success :-
<</query-dsl/query_filter_context.asciidoc,filter context>>
<<./query-dsl/query_filter_context.asciidoc,filter context>>
<<../query-dsl/query_filter_context.asciidoc,filter context>>

I build this before pushing and it did not break any test. Must all references follow the <<,>> syntax ? Sorry, please I don't seem to get the problem, in this case.

Copy link
Member

@cbuescher cbuescher Apr 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried the version I gave you (<<query-filter-context,filter context>>) using the build_docs.pl script I outlined above? All the variant you just listed are different.

I build this before pushing and it did not break any test

I'm still trying to get at what you mean by that. Could you explain what tooling you use?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This <<query-filter-context,filter context>> gives me this:

/temp/asciidoc/index.xml:78053: element link: validity error : IDREF attribute linkend references an unknown ID "query_filter_context"

I am on Windows 7, using CGwin - bash, perl, python, xsltproc installed

elasticdocs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please push the version where you get that error?

hence it is called a filter. Filters are simple checks for set inclusion or exclusion.
In most cases, the goal of filtering is to reduce the number of documents that have to be examined.

[[glossary-index]] index ::

An index is like a _table_ in a relational database. It has a
Expand Down Expand Up @@ -105,6 +114,16 @@
+
See also <<glossary-routing,routing>>

[[glossary-query]] query ::

A query is the basic component of a search. A search can be defined by one or more queries
which can be mixed and matched in endless combinations. While <<glossary-filter,filters>> are
queries that only determine if a document matches, those queries that also calculate how well
the document matches are known as "scoring queries". Those queries assign it a score, which is
later used to sort matched documents. Scoring queries take more resources than <<glossary-filter,non scoring queries>>
and their query results are not cacheable. As a general rule, use query clauses for full-text
search or for any condition that requires scoring, and use filters for everything else.

[[glossary-replica-shard]] replica shard ::

Each <<glossary-primary-shard,primary shard>> can have zero or more
Expand Down Expand Up @@ -161,8 +180,9 @@

A term is an exact value that is indexed in Elasticsearch. The terms
`foo`, `Foo`, `FOO` are NOT equivalent. Terms (i.e. exact values) can
be searched for using _term_ queries. +
See also <<glossary-text,text>> and <<glossary-analysis,analysis>>.
be searched for using _term_ queries.
+
See also <<glossary-text,text>> and <<glossary-analysis,analysis>>.

[[glossary-text]] text ::

Expand Down