Really good suggestion!  Yeah, the search will work by executing a standard
function score query with the boost script name. Thank you!


2014-06-04 15:06 GMT-07:00 joergpra...@gmail.com [via ElasticSearch Users] <
ml-node+s115913n4057071...@n3.nabble.com>:

>
> As said, it is true that scoring scripts (like the function score scripts
> o the AbstractSearchScript) need to reside on data nodes. Accessing fields
> is a low level operation in a script so it is not possible to install such
> a boost plugin that uses scripting on a data-less node. You would have to
> install it on all the data nodes which might become tedious (but it is
> doable).
>
> Another issue is that you use scripting in a java plugin. I conclude from
> this, the search should work later over the HTTP API by executing a
> standard function score query with the boost script name (is that true?)
>
> Writing a plugin, in a pure java environment, you have much more degrees
> of freedom to supersede the script functionality and use other code paths.
> For example, you could reuse the resource watch service from ES (used for
> watching script file changes) to reload the boost info (which is in your
> binary files I assume). Then you could build the query internally using the
> Java API as a custom score query action and execute it from your favorite
> (data-less) node (or from two nodes, for better fault tolerance / load
> balancing).
>
> Optionally, you could expose a new endpoint to the ES REST API, for
> example "_search_with_boost", which works like "_search", but makes use of
> the boost info files.
>
> For a more generic solution, it would be convenient to convert the boost
> info into a JSON parameter file so this could be loaded by the standard ES
> settings/config routines and by other languages, also for better reuse by
> others in the ES community :) An example plugin name could be "boost
> control plugin"...
>
> Jörg
>
>
>
> On Wed, Jun 4, 2014 at 8:15 PM, virgil <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=4057071&i=0>> wrote:
>
>> Yeah, but I would consider the nondata node is already doing the job. --
>> "These "non data" nodes are still part of the cluster, and they redirect
>> operations exactly to the node that holds the relevant data. The other
>> benefit is the fact that for scatter / gather based operations (such as
>> search), these nodes will take part of the processing since they will
>> start
>> the scatter process, and perform the actual gather processing." I just
>> uploaded my native script code in https://github.com/virgil0/TestPlugin.
>> It
>> works with the function score query. You can see that there are 3 bin
>> file I
>> need to load into memory. Thank you for reply.
>>
>>
>>
>> --
>> View this message in context:
>> http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057054.html
>>
>> Sent from the ElasticSearch Users mailing list archive at Nabble.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [hidden email]
>> <http://user/SendEmail.jtp?type=node&node=4057071&i=1>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/1401905723480-4057054.post%40n3.nabble.com
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email]
> <http://user/SendEmail.jtp?type=node&node=4057071&i=2>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGBMEEc6oC1%3DBX7gS41se13BExO_iKJtiGC6zrhmxJqxA%40mail.gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGBMEEc6oC1%3DBX7gS41se13BExO_iKJtiGC6zrhmxJqxA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057071.html
>  To unsubscribe from [ANN] Elasticsearch Simple Action Plugin, click here
> <http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4056971&code=dmlyZ2lseGllQGdtYWlsLmNvbXw0MDU2OTcxfC0xNjE2Mzk5OA==>
> .
> NAML
> <http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 

Fei (Virgil) Xie

M.S. in Very Large Information System, Institue for Software Research

School of Computer Science, Carnegie Mellon University

f...@andrew.cmu.edu

Alumni, Tsinghua University




--
View this message in context: 
http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057083.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAPRQSRfZTu0vFYOn0gbFnAUuaWQgB16vGGZspatGrL-ACt8jtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to