GithubHelp home page GithubHelp logo

tripal / tripal_elasticsearch Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 8.0 16.64 MB

License: GNU General Public License v3.0

PHP 90.09% JavaScript 8.75% CSS 1.16%
tripal search elasticsearch integration chado

tripal_elasticsearch's Introduction

alt tag

Tripal 4 (Drupal 10)

               _   _                 _____                 _                                  _
     /\       | | (_)               |  __ \               | |                                | |
    /  \   ___| |_ ___   _____      | |  | | _____   _____| | ___  _ __  _ __ ___   ___ _ __ | |_
   / /\ \ / __| __| \ \ / / _ \     | |  | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __|
  / ____ \ (__| |_| |\ V /  __/     | |__| |  __/\ V /  __/ | (_) | |_) | | | | | |  __/ | | | |_
 /_/    \_\___|\__|_| \_/ \___|     |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__|
                                                                  | |
                                                                  |_|

Compatibility

Target Drupal Version 10.2.x-dev

Tested on PostgreSQL 13 + PostgreSQL 16

Drupal 10.2.x 10.3.x
PHP 8.1 Grid81-102-Badge Grid81-103-Badge
PHP 8.2 Grid82-102-Badge Grid82-103-Badge
PHP 8.3 Grid83-102-Badge Grid83-103-Badge

Code Coverage

This project uses Code Climate to determine the quality of our codebase and the coverage of our test suite. Compatibility above is based on passing of this test suite.

Test Coverage

Maintainability

Current Timeline

Required for Tripal 4.alpha3 Release

  • Display suite / page work
  • Importers: Publications
  • Search (ElasticSearch + Views)

How to get involved!

This upgrade to Drupal 10 is a community effort. As such, we NEED YOUR HELP!

  • To get involved, please join our Tripal Slack and comment in the #core-dev channel.
    • Alternatively, feel free to contact Lacey-Anne Sanderson through Slack direct message.
    • We can use help both with programming, documentation, outreach and welcome all individuals from all backgrounds!
  • We prefer automated testing for all Pull Requests (PRs) and are happy to guide you through the process!
    • Just comment on the issue if you need help designing tests
    • If you need help implementing tests see our documentation
  • If more documentation would be helpful, please create an issue here and we'll add it.

Documentation

Documentation for Tripal 4 has begun on ReadtheDocs.

Tripal Docker

Tripal Docker is currently focused on Development and Automated Testing. There will be a production focused Tripal Docker soon and if you're interested in helping or providing tips -please join us on our Slack channel!

For more information about how to use our fully functional development docker, see our documentation on ReadtheDocs!

tripal_elasticsearch's People

Contributors

abretaud avatar almasaeed2010 avatar bradfordcondon avatar mingchen0919 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tripal_elasticsearch's Issues

admin menu index

see for example tripial content types.

All tab headings are an entry in a landing index.

Update failure

drush updatedb --yes
Tripal_elasticsearch  7212  @throws \Exception
Do you wish to run all pending updates? (y/n): y
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Rejecting mapping update to [gene_search_index] as the final mapping would have more than 1 type: [gene_search_index,                         [error]
chado.feature]"}],"type":"illegal_argument_exception","reason":"Rejecting mapping update to [gene_search_index] as the final mapping would have more than 1 type: [gene_search_index, chado.feature]"},"status":400}
ERROR: failed to add new elasticsearch fields (related_features) due to the following error
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Rejecting mapping update to [gene_search_index] as the final mapping would have more than 1 type: [gene_search_index, chado.feature]"}],"type":"illegal_argument_exception","reason":"Rejecting mapping update to [gene_search_index] as the final mapping would have more than 1 type: [gene_search_index, chado.feature]"},"status":400}Performed update: tripal_elasticsearch_update_7212                                                                                                                                                                   [ok]
'all' cache was cleared.                                                                                                                                                                                             [success]

ES warning: string field deprecated

looking at the output from my ES image:

elasticsearch_1  | [2018-01-31T18:43:33,868][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [raw]

do we care about this? Should we update our string types to text/keyword?

Error sorting Gene Search

[Mon Sep 10 12:03:21.769619 2018] [:error] [client 66.249.64.89:45390] [TRIPAL ERROR] [TRIPAL_ELASTICSEARCH] Feature search in organism Quercus                  rubra has failed with the following                   message. {"error":{"root_cause":[{"type":"parsing_exception","reason":"request does not support [sort]","line":1,"col":200}],"type":"parsing_exception","reason":"request does not support [sort]","line":1,"col":200},"status":400}

index management form fails if no ES servers

index management page is blank if no elasticsearch server is connected at /admin/tripal/extension/tripal_elasticsearch/indices_management.

Confusing if you're setting it up for the first time.

Error in Gene Search

Notice: Undefined index: organism in tripal_elasticsearch_gene_search_index_results() (line 259 of /data/www/html/hardwoods_dev/drupal-7.52/sites/all/modules/custom/tripal_elasticsearch/includes/tripal_elasticsearch.gene_search.form.inc).

Error when deleting nodes

Notice: Undefined property: stdClass::$id in tripal_elasticsearch_node_delete() (line 658 of /data/www/html/hardwoods_dev/drupal-7.52/sites/all/modules/custom/tripal_elasticsearch/tripal_elasticsearch.module).
Warning: strtr(): The second argument is not an array in syslog_watchdog() (line 115 of /data/www/html/hardwoods_dev/drupal-7.52/modules/syslog/syslog.module).

Honor the expose option

Currently, whether the expose index option is checked or not, the index is always available for cross site search.

when no alive nodes, fail gracefully

currently a search fails with this error

Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection() (line 51 of /data/www/html/hardwoods_dev/drupal-7.52/sites/all/libraries/elasticsearch-php/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php).
presumably when ES connection is down.

would be better if it provided an error message but didnt break site.

collections and bundle types

User is currently asked to select a bundle type when creating a collection. It is choose one only.

screen shot 2018-03-19 at 10 42 18 am

  1. Collections now supports multiple bundle types per collection.

  2. The search interface only lets you filter a single bundle type per search.

I think the correct way to do this is to a) do away with the first question, autodetect what bundles are in the search, and b) make the "filter by bundle" sidebar multiselect.

Migration errors

error with Tripal_elasticsearch 7206 and 7207

Cannot add field tripal_elasticsearch_queues.type: table doesn't exist.                                                         [error]
Performed update: tripal_elasticsearch_update_7206                                                                              [ok]

failing to provide host breaks site

This exception prevents content from loading.

Exception: A host was not provided. Please set an Elasticsearch host through the admin interface.
 in ESInstance->__construct() (line 50 of /Users/chet/UTK/tripal/sites/all/modules/custom/tripal_elasticsearch/includes/Elasticsearch/ESInstance.php).

Is this as intended?

Feature Search in Organism Pages Fails

Feature search field in organism pages does not return results based on the current organism but any organism that matches the search terms. Need to refine the organism index to do a "must" query rather than "should"

Categories block doesn't need pages config

Since the block does not render until there are results, we should remove the pages config since most people don't have those pages until after the module is created which makes the block not render at all.

Updating index.max_result_window must be done after creating the index

Elasticseach by default returns upto 10,000 results and errs when requesting anything more than that. The way to update the index is using

curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
  "index.max_result_window" : "1000000"
}'

Question is can this be done while the cluster is up and running? Maybe we should look into a way that assigns it this setting when creating the index.

Error getting property of non-object

PHP Notice: Trying to get property of non-object in /var/www/html/sites/all/modules/custom/tripal_elasticsearch/includes/Jobs/NodesIndexJob.php on line 68 pid 23318
WD tripal_elasticsearch:                                                 [error]
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed
to parse"}],"type":"mapper_parsing_exception","reason":"failed to
parse","caused_by":{"type":"not_x_content_exception","reason":"Compressor
detection can only be called on some xcontent bytes or compressed
xcontent bytes"}},"status":400}
[site http://default] [TRIPAL ERROR] [TRIPAL_ELASTICSEARCH] {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse"}],"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"}},"status":400}

This is happening on our live site.

Error when host is not available

screen shot 2018-08-20 at 1 27 48 pm

Error: Class 'Elasticsearch\ClientBuilder' not found in ESInstance->__construct() (line 60 of /Users/Almsaeed/Work/DevSites/Tripal/sites/all/modules/tripal_elasticsearch/includes/Elasticsearch/ESInstance.php).

Data collections url changed

In the most recent tripal version, data collections URL changed so we need to update our collections modal to redirect to the new URL.

error spamming publishing with elasticsearch down

I published 500 biosamples on my dev site.

For each one i got an error:

WD tripal_elasticsearch: No alive nodes found in your cluster                                                                   [error]

kind of a bummer. here is my current setup:

Screen Shot 2018-01-29 at 12.31.42 PM

so i dont even have ES running locally, let alone an idnex to add the entities to.

Fields attach hook

Look into a way to trigger a hook when an entities gets a new/deletes a field

Slow gene search indexing

Can we loop through entities and collect annotations instead? Would this be faster?

Maybe we should use a the feature_dbxref table to collect annotations (could be faster).

Remove Header/Menus From Index

Currently we are indexing the entire page, including header and navigation items. One way to do this is to render nodes manually and invoking all node_view hooks. For entities, we need to invoke field hooks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.