Multiple revisions of a node get indexed on elastic server

Created on 17 May 2018, over 6 years ago
Updated 30 August 2024, 4 months ago

I am getting more than one revision of a same node from search API indexing. The index is created with content:revisions as data source. Search API query doesn't provide any group by function to use so that I can get a single record for a node ID. Below is code snippet I am currently running:-

$query = \Drupal\search_api\Entity\Index::load($index_name)->query();
if (!empty($queries)) {
foreach($queries as $qkey => $qval) {
if (is_array($qval)) {
$query->addCondition($qkey, $qval[0], $qval[1]);
}
else {
$query->addCondition($qkey, $qval);
}
}
}
if (!empty($search_string)) {
$query->keys($search_string);
}
$query->range($offset, $limit);
$data = $query->execute();
$results = [];
if (!empty($data->getResultItems())) {
$results = $data->getResultItems();
kint($results);die;
}

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Elasticsearch Connector Search API

Created by

🇮🇳India kanyan.ror@gmail.com

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada mparker17 UTC-4

    The version of elasticsearch_connector that this issue is filed against (8.x-1.x) is no longer supported by the maintainers, so I am going to close this issue as "Outdated".

    However, if you are still experiencing this issue, could I trouble you to...

    1. Re-open this ticket by setting its Status to "Active"
    2. Confirm which version of elasticsearch_connector you are using
    3. Provide some more information about your configuration

    (I am cleaning up old issues as part of a big review of open issues for 🌱 [Meta] Roadmap for a stable release with security coverage Active : thank you for your patience with me)

Production build 0.71.5 2024