Giter Club home page Giter Club logo

elasticsearch-suggest-plugin's Introduction

elasticsearch-suggest-plugin's People

Contributors

spinscale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elasticsearch-suggest-plugin's Issues

Scoring/faceting suggestions

Hey,
It would be great to have a little more information about suggestions, for example suggest plugin could return information about suggested phrases with number of entries it found.

For example, for phrase "prod" the output would be:

{
  "suggestions": [
        {
                    "term": "product",
                    "count": 35735,
        },
        {
                    "term": "prodigy",
                    "count": 256,
        },
        {
                    "term": "production",
                    "count": 11,
        }
    ],
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0
  }
}

instead of:

{
  "suggestions" : [ "product", "prodigy", "production" ],
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0
  }
}

What do you think?

Term suggestions sorted by weight/frequency

Hi,
I noticed that the terms returned by the FST suggester are always sorted alphabetically. However, I would like to have them sorted by frequency. As far as I can tell, this would require changing the ShardSuggestResponse to include not only the terms but also their weight and then aggregating the shard responses in TransportSuggestAction.newResponse to form a list of all suggestions sorted by weight. While doing that one could also expose the number of buckets used by FSTCompletionLookup as a configuration setting and alternatively also support using WFSTCompletionLookup.

But, before I start with any of that:

  • Are you open to accepting a pull request making these changes?
  • Do you know if there is another way to get term completion suggestion sorted by frequency? I think that the new ES completion suggester is not the right fit since I want it to suggest single terms.

Thanks!

I would like to suggest "products" where I find the term in between the product name

When I use the demo-application I only can find suggest's where the word begins with the term I've entered. How do I need to modify my mapping or query when I would like to find products with the term in the product name?

Example Product Name: Aktentasche Folder A4 sort
This I would like to suggest, when I look up for "A4".

But there comes no suggestion at the moment. Is that possible?

Help me about FST based suggestions

I'm a newbie in here, and sorry for my bad English . I need you help about FST based suggestions because when I installed the "elasticsearch-suggest-plugin" . I try to post like example

curl -X POST 'localhost:9200/products1/product/__suggest?pretty=1' -d '{ "field": "ProductName.suggest", "term": "tischwäsche", "size": "10" }'

It doesn't show me the result like this :

{
"suggest" : [ "tischwäsche", "tischwäsche 100",
"tischwäsche aberdeen", "tischwäsche acryl", "tischwäsche ambiente",
"tischwäsche aquarius", "tischwäsche atlanta", "tischwäsche atlas",
"tischwäsche augsburg", "tischwäsche aus", "tischwäsche austria" ]
}

That it show me :

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 113

{
"ok" : true,
"_index" : "products1",
"_type" : "product",
"_id" : "__suggest",
"_version" : 3
}

Please help me . I make ​​a mistake somewhere ? :(

Type in url

It would be nice if rest API accept no type as most api do.

By the way I don't know if it make sense / is possible for suggest to filter by type ?

Publish artifact in maven repo

Heya,

Your artifact can not be downloaded as a maven dependency. It doesn't seem to exist in sonatype OSS repository.
Do you planned to publish it as an artifact ?

Thanks
David.

Cannot start with elasticsearch 1.3.5

2015-04-09 14:27:20,673][INFO ][node ] [Guido Carosella] version[1.3.5], pid[4869], build[4a50e7d/2014-11-05T15:21:28Z]
[2015-04-09 14:27:20,673][INFO ][node ] [Guido Carosella] initializing ...
[2015-04-09 14:27:20,743][INFO ][plugins ] [Guido Carosella] loaded [mapper-attachments, mongodb-river, lang-javascript, suggest, analysis-vietnamese], sites [HQ, river-mongodb]
[2015-04-09 14:27:22,970][ERROR][bootstrap ] {1.3.5}: Initialization Failed ...

  1. NoSuchMethodError[org.elasticsearch.rest.BaseRestHandler.(Lorg/elasticsearch/common/settings/Settings;Lorg/elasticsearch/rest/RestController;Lorg/elasticsearch/client/Client;)V]

Broken on ElasticSearch 1.2.0

On ElasticSearch 1.2.0, installing suggest-plugin causes the following:

 adamj@Harvester  ~/Development/SpringLab/Python/recomed/search/recomed-elasticsearch   staging  elasticsearch-1.2.0/bin/elasticsearch   
[2014-05-29 14:18:40,462][INFO ][node                     ] [Kem Horkus] version[1.2.0], pid[15944], build[c82387f/2014-05-22T12:49:13Z]
[2014-05-29 14:18:40,463][INFO ][node                     ] [Kem Horkus] initializing ...
[2014-05-29 14:18:40,478][INFO ][plugins                  ] [Kem Horkus] loaded [marvel, suggest], sites [marvel]
{1.2.0}: Initialization Failed ...
- ExecutionError[java.lang.NoClassDefFoundError: org/elasticsearch/rest/XContentThrowableRestResponse]
        NoClassDefFoundError[org/elasticsearch/rest/XContentThrowableRestResponse]
                ClassNotFoundException[org.elasticsearch.rest.XContentThrowableRestResponse]

Initially I thought the problem was Marvel but removing suggest plugin fixed the issue.

How to get suggest from few fields?

Hi,
I need get all suggestions from my document, but I don't know how set multiple fields.

Ex 1 - This working fine, but is not suggest all document properties:

curl -XPOST "http://localhost:9200/index/type/__suggest" -d'
{
  "field": "category_name",
  "term": "c",
  "size": "10",
  "type": "fuzzy",
   "analyzer" : "standard"
}' 

I Need something like this:

curl -XPOST "http://localhost:9200/index/type/__suggest" -d'
{
  "fields": {
    "category_name": "value",
    "other properties": "another value",
},
  ...
}' 

Thank you.

Java version wrong

The pom.xml states that the java version must be 1.6,
but the use of "Objects" is feature from java 1.7.
That's why compilation fails on some machines.

see:

src/main/java/de/spinscale/elasticsearch/service/suggest/ShardSuggestService.java

Very slow requests

Just installed the plugin (thanks for all the great work).

Just using it with the instructions and each query is taking ~ 2 secs (100,000 records, 8 gb ram) using the fuzzy suggester.

Integrate AnalzyingSuggester into plugin

with the version bump to lucene 4.x the analyzing suggester becomes available, offering a real nice feature: Search for any term returns the complete unanalyzed term from the index...

enablePositionIncrements=false is not supported anymore

When I try :
curl -X POST localhost:9200/cars/car/__suggest -d '{ "field" : "name", "type": "full", "term" : "b", "analyzer" : "standard" }'

I got it

reason: BroadcastShardOperationFailedException[[cars][0] ]; nested: UncheckedExecutionException[java.lang.IllegalArgumentException: enablePositionIncrements=false is not supported anymore as of Lucene 4.4 as it can create broken token streams]; nested: IllegalArgumentException[enablePositionIncrements=false is not supported anymore as of Lucene 4.4 as it can create broken token streams]

Please help me . I use elasticsearch 0.90.5

Any plan to support elasticsearch 1.3 ?

I try to use but got error like this :

  1. No implementation for org.elasticsearch.action.GenericAction annotated with @org.elasticsearch.common.inject.multibindings.Element(setName=,uniqueId=1) was bound.
    at de.spinscale.elasticsearch.module.suggest.SuggestClientModule.configure(SuggestClientModule.java:17)

  2. An exception was caught and reported. Message: null
    at org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)

twice search got an error

When I was using this plugin,I exute
curl -X POST localhost:9200/cars/car/__suggest -d '{ "field" : "name", "type": "full", "term" : "b", "analyzer" : "suggest_analyzer_stopwords" }'

{"_shards":{"total":5,"successful":5,"failed":0},"suggestions":["BMW 320","BMW 525d","The BMW ever"]}
```java

it was right.but i excute again,i got errorhow could i fix this?
```java
{
  "_shards" : {
    "total" : 5,
    "successful" : 0,
    "failed" : 5,
    "failures" : [ {
      "index" : "cars",
      "shard" : 0,
      "reason" : "BroadcastShardOperationFailedException[[cars][0] ]; nested: NoClassDefFoundError[java/util/Objects]; "
    }, {
      "index" : "cars",
      "shard" : 1,
      "reason" : "BroadcastShardOperationFailedException[[cars][1] ]; nested: NoClassDefFoundError[java/util/Objects]; "
    }, {
      "index" : "cars",
      "shard" : 2,
      "reason" : "BroadcastShardOperationFailedException[[cars][2] ]; nested: NoClassDefFoundError[java/util/Objects]; "
    }, {
      "index" : "cars",
      "shard" : 3,
      "reason" : "BroadcastShardOperationFailedException[[cars][3] ]; nested: NoClassDefFoundError[java/util/Objects]; "
    }, {
      "index" : "cars",
      "shard" : 4,
      "reason" : "BroadcastShardOperationFailedException[[cars][4] ]; nested: NoClassDefFoundError[java/util/Objects]; "
    } ]
  },
  "suggestions" : [ ]
}
```java
sorry for my poor english....

manual refresh

I was wondering: when are the suggestions loaded into memory,
and how much is loaded? I set "refresh_disabled" to "false",
and posted '{ "field":"suggest" }' to the api in order to create the
suggest index. But curl returns too quickly. It seems that
the actual indexing is delayed? The first request to your
api takes a lot of time, so I conclude that is the actual
build of the index is delayed till then?

Thanks in advance

Can't install plugin

I've tried to install this plugin using the command as described in the readme, but it fails to install.

[vagrant@elasticsearch-edwardsmit elasticsearch]$ bin/plugin -install de.spinscale/elasticsearch-plugin-suggest/0.90.3-0.8 -verbose
-> Installing de.spinscale/elasticsearch-plugin-suggest/0.90.3-0.8...
Trying http://download.elasticsearch.org/de.spinscale/elasticsearch-plugin-suggest/elasticsearch-plugin-suggest-0.90.3-0.8.zip...
Failed: IOException[Can't get http://download.elasticsearch.org/de.spinscale/elasticsearch-plugin-suggest/elasticsearch-plugin-suggest-0.90.3-0.8.zip to /opt/elasticsearch/plugins/plugin-suggest.zip]; nested: FileNotFoundException[http://download.elasticsearch.org/de.spinscale/elasticsearch-plugin-suggest/elasticsearch-plugin-suggest-0.90.3-0.8.zip]; nested: FileNotFoundException[http://download.elasticsearch.org/de.spinscale/elasticsearch-plugin-suggest/elasticsearch-plugin-suggest-0.90.3-0.8.zip];
Trying http://search.maven.org/remotecontent?filepath=de/spinscale/elasticsearch-plugin-suggest/0.90.3-0.8/elasticsearch-plugin-suggest-0.90.3-0.8.zip...
Failed: IOException[Can't get http://search.maven.org/remotecontent?filepath=de/spinscale/elasticsearch-plugin-suggest/0.90.3-0.8/elasticsearch-plugin-suggest-0.90.3-0.8.zip to /opt/elasticsearch/plugins/plugin-suggest.zip]; nested: FileNotFoundException[http://search.maven.org/remotecontent?filepath=de/spinscale/elasticsearch-plugin-suggest/0.90.3-0.8/elasticsearch-plugin-suggest-0.90.3-0.8.zip]; nested: FileNotFoundException[http://search.maven.org/remotecontent?filepath=de/spinscale/elasticsearch-plugin-suggest/0.90.3-0.8/elasticsearch-plugin-suggest-0.90.3-0.8.zip];
Trying https://oss.sonatype.org/service/local/repositories/releases/content/de/spinscale/elasticsearch-plugin-suggest/0.90.3-0.8/elasticsearch-plugin-suggest-0.90.3-0.8.zip...
Failed: IOException[Can't get https://oss.sonatype.org/service/local/repositories/releases/content/de/spinscale/elasticsearch-plugin-suggest/0.90.3-0.8/elasticsearch-plugin-suggest-0.90.3-0.8.zip to /opt/elasticsearch/plugins/plugin-suggest.zip]; nested: FileNotFoundException[https://oss.sonatype.org/service/local/repositories/releases/content/de/spinscale/elasticsearch-plugin-suggest/0.90.3-0.8/elasticsearch-plugin-suggest-0.90.3-0.8.zip]; nested: FileNotFoundException[https://oss.sonatype.org/service/local/repositories/releases/content/de/spinscale/elasticsearch-plugin-suggest/0.90.3-0.8/elasticsearch-plugin-suggest-0.90.3-0.8.zip];
Trying https://github.com/de.spinscale/elasticsearch-plugin-suggest/zipball/v0.90.3-0.8... (assuming site plugin)
Failed: IOException[Can't get https://github.com/de.spinscale/elasticsearch-plugin-suggest/zipball/v0.90.3-0.8 to /opt/elasticsearch/plugins/plugin-suggest.zip]; nested: FileNotFoundException[https://github.com/de.spinscale/elasticsearch-plugin-suggest/zipball/v0.90.3-0.8]; nested: FileNotFoundException[https://github.com/de.spinscale/elasticsearch-plugin-suggest/zipball/v0.90.3-0.8];
Failed to install de.spinscale/elasticsearch-plugin-suggest/0.90.3-0.8, reason: failed to download out of all possible locations..., use -verbose to get detailed information

Suggests for multiple fields

Hi.

Is there any difficulties to add ability to suggest not only for one specific field?

For example it would be great to make queries like this:

cur -X GET localhost:9200/cars/car/__suggest?pretty=1 -d '{ "fields": ["name", "description"], "term": "au", "size": "10"  }'

Not able to boot ES .19.0 with suggest plugin

I am seeing this error

[2012-03-04 07:45:58,571][INFO ][node ] [Annalee] {0.19.0}[20701]: initializing ...
[2012-03-04 07:45:58,580][INFO ][plugins ] [Annalee] loaded [suggest], sites []
[2012-03-04 07:46:00,576][ERROR][bootstrap ] {0.19.0}: Initialization Failed ...

  1. NoSuchMethodError[org.elasticsearch.client.node.NodeClient.(Lorg/elasticsearch/common/settings/Settings;Lorg/elasticsearch/threadpool/ThreadPool;Lorg/elasticsearch/client/node/NodeAdminClient;Lorg/elasticsearch/action/index/TransportIndexAction;Lorg/elasticsearch/action/delete/TransportDeleteAction;Lorg/elasticsearch/action/bulk/TransportBulkAction;Lorg/elasticsearch/action/deletebyquery/TransportDeleteByQueryAction;Lorg/elasticsearch/action/get/TransportGetAction;Lorg/elasticsearch/action/get/TransportMultiGetAction;Lorg/elasticsearch/action/count/TransportCountAction;Lorg/elasticsearch/action/search/TransportSearchAction;Lorg/elasticsearch/action/search/TransportSearchScrollAction;Lorg/elasticsearch/action/mlt/TransportMoreLikeThisAction;Lorg/elasticsearch/action/percolate/TransportPercolateAction;)V]

1.3.2-2.0.1 not found in de.spinscale/elasticsearch-plugin-suggest/

Hi,

Thank you for this nice plugin.
I'm using es 1.3.2 and I have to install the same version from this plugin however I get this error when installing :

bin/plugin -install de.spinscale/elasticsearch-plugin-suggest/1.3.2-2.0.1

-> Installing de.spinscale/elasticsearch-plugin-suggest/1.3.2-2.0.1...
Trying http://download.elasticsearch.org/de.spinscale/elasticsearch-plugin-suggest/elasticsearch-plugin-suggest-1.3.2-2.0.1.zip...
Trying http://search.maven.org/remotecontent?filepath=de/spinscale/elasticsearch-plugin-suggest/1.3.2-2.0.1/elasticsearch-plugin-suggest-1.3.2-2.0.1.zip...
Trying https://oss.sonatype.org/service/local/repositories/releases/content/de/spinscale/elasticsearch-plugin-suggest/1.3.2-2.0.1/elasticsearch-plugin-suggest-1.3.2-2.0.1.zip...
Trying https://github.com/de.spinscale/elasticsearch-plugin-suggest/archive/1.3.2-2.0.1.zip...
Trying https://github.com/de.spinscale/elasticsearch-plugin-suggest/archive/master.zip...
Failed to install de.spinscale/elasticsearch-plugin-suggest/1.3.2-2.0.1, reason: failed to download out of all possible locations..., use --verbose to get detailed information

is there any other way to install it from source code ?

thanks

Context support for the suggester

ElasticSearch 1.2 adds the ability to limit suggestions of the build in suggesters to a specific scope. I have no idea how complex it would be, but are there any plans to add this functionality to this plugin?

Relevancy sort

Hello,

Resulting suggestions are sorted alphabetically, is there a way to sort them by score?

Thanks.

Fully deactivate automatic refresh

Could it be possible to fully deactivate automatic refresh ?

I'd like to test the plugin on big index but prefer to be able to choose the time of refresh.

Chinese smart tips to get out

Chinese smart tips to get out, whether to use the Chinese word I use is groovy, not quite sure how to use,sorry ,i'm student from china

can not work as plugin in Elasticsearch 1.5

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)

Caused by: java.lang.VerifyError: class de.spinscale.elasticsearch.rest.action.suggest.RestSuggestAction overrides final method handleRequest.(Lorg/elasticsearch/rest/RestRequest;Lorg/elasticsearch/rest/RestChannel;)V
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at de.spinscale.elasticsearch.plugin.suggest.SuggestPlugin.onModule(SuggestPlugin.java:55)

have any plan to deal with ES 1.5?

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.