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

Search API: Support highlighting #69

Closed
kimchy opened this issue Mar 18, 2010 · 3 comments
Closed

Search API: Support highlighting #69

kimchy opened this issue Mar 18, 2010 · 3 comments

Comments

@kimchy
Copy link
Member

kimchy commented Mar 18, 2010

Allow to highlight search results on one or more fields. The implementation uses the lucene fast-vector-highlighter. The search request body:

{
    query : {...},
    highlight : {
        fields : {
            "_all" : {}
        }
    }
}

In the above case, the _all field will be highlighted for each search hit (there will be another element in each search each, called highlight, which includes the highlighted fields and the highlighted fragments).

Note, in order to highlight, the field in question must be stored and have termVector of with_positions_offsets. In the above case, the mapping should include:

{
    typeName : {
        allField : {store : "yes", termVector : "with_positions_offsets"}
    }
}

The _all field can be an easy to use candidate for highlighting.

By default, the highlighting will wrap highlighted text in <em> and </em>. This can be controlled by setting preTags and postTags, for example:

{
    query : {...},
    highlight : {
        preTags : ["<tag1>", "<tag2>"],
        postTags : ["</tag1>", "</tag2>"]
        fields : {
            "_all" : {}
        }
    }
}

There can be a single tag or more, and the "importance" is ordered. There are also built in "tag" schemas, with currently a single schema called styled with preTags of:

<em class="hlt1">, <em class="hlt2">, <em class="hlt2">,
<em class="hlt3">, <em class="hlt4">, <em class="hlt5">,
<em class="hlt6">, <em class="hlt7">, <em class="hlt8">,
<em class="hlt9">

And post tag of </em>. If you think of more nice to have built in tag schemas, just commend on this issue or post another issue to create it. Here is an example of switching tag schemas:

{
    query : {...},
    highlight : {
        tagSchema : "styled",
        fields : {
            "_all" : {}
        }
    }
}

Each field highlighted can control the size of the highlighted fragment in characters (defaults to 100), and the maximum number of fragments to return (defaults to 5). For example:

{
    query : {...},
    highlight : {
        fields : {
            "_all" : {fragmentSize : 150, numberOfFragments : 3}
        }
    }
}
@kimchy
Copy link
Member Author

kimchy commented Mar 18, 2010

Search API: Support highlighting, closed by 28b0b5f.

@phoet
Copy link

phoet commented Apr 10, 2012

is the _all field a special document attribute, or some other kind of special field that one can add to a document? is there further info on this?

@kimchy
Copy link
Member Author

kimchy commented Apr 15, 2012

@phoet see http://www.elasticsearch.org/guide/reference/mapping/all-field.html, questions are best asked on the mailing list, since issues are not monitored by the whole ES community.

rmuir pushed a commit to rmuir/elasticsearch that referenced this issue Nov 8, 2015
With elastic#68 we replaced `language`field with `_language`.

We can now remove the old deprecated name.

Closes elastic#69.
(cherry picked from commit e39f144)
tlrx added a commit that referenced this issue Nov 10, 2016
This commit updates JodaTime to version 2.9.5 that contain a fix for a bug when parsing time zones (see JodaOrg/joda-time#332, JodaOrg/joda-time#386 and JodaOrg/joda-time#373).

It also remove the joda-convert dependency that seems to be unused.
    
closes #20911

Here is the changelog for 2.9.5:
```
Changes in 2.9.5
----------------
 - Add Norwegian period translations [#378]

 - Add Duration.dividedBy(long,RoundingMode) [#69, #379]

 - DateTimeZone data updated to version 2016i

 - Fixed bug where clock read twice when comparing two nulls in DateTimeComparator [#404]

 - Fixed minor issues with historic time-zone data [#373]

 - Fix bug in time-zone binary search [#332, #386]
  The fix in v2.9.2 caused problems when the time-zone being parsed
  was not the last element in the input string. New approach uses a
  different approach to the problem.

 - Update tests for JDK 9 [#394]

 - Close buffered reader correctly in zone info compiler [#396]

 - Handle locale correctly zone info compiler [#397]
```
tlrx added a commit that referenced this issue Nov 10, 2016
This commit updates JodaTime to version 2.9.5 that contain a fix for a bug when parsing time zones (see JodaOrg/joda-time#332, JodaOrg/joda-time#386 and JodaOrg/joda-time#373).

It also remove the joda-convert dependency that seems to be unused.

closes #20911

Here is the changelog for 2.9.5:
```
Changes in 2.9.5
----------------
 - Add Norwegian period translations [#378]

 - Add Duration.dividedBy(long,RoundingMode) [#69, #379]

 - DateTimeZone data updated to version 2016i

 - Fixed bug where clock read twice when comparing two nulls in DateTimeComparator [#404]

 - Fixed minor issues with historic time-zone data [#373]

 - Fix bug in time-zone binary search [#332, #386]
  The fix in v2.9.2 caused problems when the time-zone being parsed
  was not the last element in the input string. New approach uses a
  different approach to the problem.

 - Update tests for JDK 9 [#394]

 - Close buffered reader correctly in zone info compiler [#396]

 - Handle locale correctly zone info compiler [#397]
```

(cherry picked from commit 2e53190)
tlrx added a commit that referenced this issue Nov 10, 2016
This commit updates JodaTime to version 2.9.5 that contain a fix for a bug when parsing time zones (see JodaOrg/joda-time#332, JodaOrg/joda-time#386 and JodaOrg/joda-time#373).

It also remove the joda-convert dependency that seems to be unused.

closes #20911

Here is the changelog for 2.9.5:
```
Changes in 2.9.5
----------------
 - Add Norwegian period translations [#378]

 - Add Duration.dividedBy(long,RoundingMode) [#69, #379]

 - DateTimeZone data updated to version 2016i

 - Fixed bug where clock read twice when comparing two nulls in DateTimeComparator [#404]

 - Fixed minor issues with historic time-zone data [#373]

 - Fix bug in time-zone binary search [#332, #386]
  The fix in v2.9.2 caused problems when the time-zone being parsed
  was not the last element in the input string. New approach uses a
  different approach to the problem.

 - Update tests for JDK 9 [#394]

 - Close buffered reader correctly in zone info compiler [#396]

 - Handle locale correctly zone info compiler [#397]
```

(cherry picked from commit 2e53190)
ClaudioMFreitas pushed a commit to ClaudioMFreitas/elasticsearch-1 that referenced this issue Nov 12, 2019
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
add id extraction
add id awareness to document writes (create/index)
add M&R test
relates to elastic#69
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
remove serialization from buffered rest client
introduce Command classes as a templating mechanism encapsulating underlying serialization

relates elastic#69
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
add integration tests
reset ES settings within Hadoop configuration
relates to elastic#69
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
refactor command infrastructure
add internal command templating
improved serialization limiting 'garbage' copies
relates to elastic#66 elastic#85 elastic#81 elastic#69
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
mindw pushed a commit to mindw/elasticsearch that referenced this issue Sep 5, 2022
…lastic#69)

Update lambda scale to handle all instance types for terraform stack

* This commit is for https://engageli.atlassian.net/browse/MPC-1455

It removes the restriction on the scaling lambda, so it will now
scale all instances in the terraform stack, except for RDS / REDIS.
The instances to be scaled, are now determined by the instance roles
passed via the event JSON for the lambda, and these roles must match
the tag:Role for each instance.

Additionally, it changes the order of operation so that it will
scale the standard EC2 instances first, and then perform the
instance refresh for the auto-scaling group `ams`.  This was
required since if an auto-scaling event was already in progress
when the lamdba executed, it did not correctly process the
standard EC2 instances.
modified:   aws/ams-cluster-v1-tf/scale.tf
modified:   aws/scale-lambda-source-code/README
modified:   aws/scale-lambda-source-code/sample-event.json
modified:   aws/scale-lambda-source-code/scale.py

* fixup
modified:   aws/scale-lambda-source-code/scale.py

Approved-by: Gideon Avida
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Oct 2, 2023
With this commit we set `JAVA[7-11]_HOME` before starting the Rally
daemon so Rally can use those to resolve the proper path to the
respective JDK.

Relates elastic/rally#518
Closes elastic#69
Relates elastic#72
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants