Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » SmartField & ElasticSearch
SmartField & ElasticSearch [message #1748827] Tue, 29 November 2016 07:21 Go to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi there,

has anybody of you ever tried to integrate ElasticSearch with a SmartField?

Is it even possible?

How could I achieve, that the data set of a smartfield is repopulated on every keystroke?

Thanks,

Peter
Re: SmartField & ElasticSearch [message #1748837 is a reply to message #1748827] Tue, 29 November 2016 08:54 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan MotschFriend
Messages: 154
Registered: March 2010
Senior Member
All you need to feed the smartfield is a LookupCall.
Either a service-based LookupCall using a LookupService or a LocalLookupCall where you implement the lookup logic directly inside the LocalLookupCall.
This way you can integrate whatever technology into a smartfield.
Re: SmartField & ElasticSearch [message #1748843 is a reply to message #1748837] Tue, 29 November 2016 09:23 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi,
thanks for the answer

so this means, I just have to populate my Lookup rows, the way I want. And with every keystroke, the query is triggered again?

Peter
Re: SmartField & ElasticSearch [message #1748847 is a reply to message #1748843] Tue, 29 November 2016 09:52 Go to previous messageGo to next message
Matthias Zimmermann is currently offline Matthias ZimmermannFriend
Messages: 208
Registered: June 2015
Senior Member
exactly. you might want to have a look at classes ResponsibleField and UserLookupCall and in the spring+scout demo app [1].

[1] https://github.com/BSI-Business-Systems-Integration-AG/SpringBoot-and-EclipseScout

[Updated on: Tue, 29 November 2016 09:53]

Report message to a moderator

Re: SmartField & ElasticSearch [message #1748853 is a reply to message #1748847] Tue, 29 November 2016 11:06 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi,

already had a look at it Smile

What I can see so far is, that when hitting a key the LookupCall.getDataByText() is called. And there everything is retrieved from the data source and afterwards the filter is applied.

Wouldn't it be much more sufficient to let the data source do the querying? Because lets assume I have a table with 1 mio orders... The whole table would be fetched and then just after the retrieval the filter would be applied...

Peter
Re: SmartField & ElasticSearch [message #1748855 is a reply to message #1748853] Tue, 29 November 2016 11:37 Go to previous messageGo to next message
Matthias Zimmermann is currently offline Matthias ZimmermannFriend
Messages: 208
Registered: June 2015
Senior Member
for the case of millions of rows you are right of course. in that case you might want to go for a custom implementation for the ILookupService. for an sql based backend you can also extend the conveniene class AbstractSqlLookupService (a specific example being the PersonLookupService in the scout "contacts" application [1].

in these examples the data source returns only a subset to the smartfield, so even if the data source contains millions of records only 100 matching examples are extracted. in the case of a consuming smart field a notice is shown to the user that the data source contains more examples that are shown to the user.

[1] https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/blob/releases/6.1.x/code/contacts/org.eclipse.scout.contacts.server/src/main/java/org/eclipse/scout/contacts/server/person/PersonLookupService.java
Re: SmartField & ElasticSearch [message #1748912 is a reply to message #1748855] Wed, 30 November 2016 05:54 Go to previous message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi Matthias,
thanks. I get the idea Smile

Peter
Previous Topic:scoutjs
Next Topic:Fire property chane events when key is pressed?
Goto Forum:
  


Current Time: Fri Apr 19 16:58:37 GMT 2024

Powered by FUDForum. Page generated in 0.02178 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top