blob: 3b95430e339cadba4e445741a94e53e8e8d05e19 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<head>
<meta charset="utf-8" />
<title>ElasticSearchLookupService</title>
<link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css" />
</head>
<body>
<!-- Processor Documentation ================================================== -->
<h2>Description:</h2>
<p>
This lookup service uses ElasticSearch as its data source. Mappings in LookupRecord map record paths to paths within
an ElasticSearch document. Example:
</p>
<p>
<em>/user/name</em> => <em>user.contact.name</em>
</p>
<p>
That would map the record path <em>/user/name</em> to an embedded document named <em>contact</em> with a field named
<em>name</em>.
</p>
<p>
The query that is assembled from these is a boolean query where all of the criteria are under the <em>must</em> list.
In addition, wildcards are not supported right now and all criteria are translated into literal <em>match</em> queries.
</p>
<h2>Post-Processing</h2>
<p>
Because an ElasticSearch result might be structured differently than the record which will be enriched by this service,
users can specify an additional set of mappings on this lookup service that map JsonPath operations to record paths. Example:
</p>
<p>
<em>$.user.contact.email</em> => <em>/user/email_address</em>
</p>
<p>
Would copy the field <em>email</em> from the embedded document <em>contact</em> into the record at that path.
</p>
</body>
</html>