Using Facets

Hi,

I'm new to ES and I'm start building a web application based on it.

I've read that Faces allows to filter the result of a query, but in a web
scenario after I bind the first result query to a control (let say a table)
if I want to filter it with the Facets I have to re-run my query ?
What is the common architecture use ?

I think it's not a good idea to store the result of the query in the user
session.

I just want to start with develping a simple web page to discover the power
of ES and understand how it can interact with a web application.

Thanks

--

Have a look at my JUG/Devoxx demo web site :
http://www.pilato.fr/devoxxfr_demo/

Source code is here: https://github.com/dadoonet/devoxxfr_demo

It could help to build your demo (or you can use it as is)

HTH

David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 30 nov. 2012 à 09:20, evil80 archivio@inbox.com a écrit :

Hi,

I'm new to ES and I'm start building a web application based on it.

I've read that Faces allows to filter the result of a query, but in a web scenario after I bind the first result query to a control (let say a table) if I want to filter it with the Facets I have to re-run my query ?
What is the common architecture use ?

I think it's not a good idea to store the result of the query in the user session.

I just want to start with develping a simple web page to discover the power of ES and understand how it can interact with a web application.

Thanks

--

I need to develop a web application that allow a user to search.
The application will start with 10TB of data must have a realtime response.

The search engine will be so simple, at the beginning.
Imagine to have a document with these field :

  • Data
  • Branch code
  • Article number
  • Sell price

I have to give to a user a web page in which he can simply enter the value
and return all the matches document.

Do you think ES can handle this volume of data ? Millions of documents for
an initial size of 10TB.
I'm going to use .NET to develop the frontend because it's my favorite
platform (I'm evaluating to use bootstrap as your demo too).

What kind of query can better perform on ES in this scenario ?
Facets can be return together with the main query and applied in a second
time on the client ?

I've seen that your example is developed in Javascript, it could be
difficult to build something like that with a server-side technology like
Asp.NET ?

Thanks a lot!
Il giorno venerdì 30 novembre 2012 09:33:14 UTC+1, David Pilato ha scritto:

Have a look at my JUG/Devoxx demo web site :
http://www.pilato.fr/devoxxfr_demo/

Source code is here: https://github.com/dadoonet/devoxxfr_demo

It could help to build your demo (or you can use it as is)

HTH

David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 30 nov. 2012 à 09:20, evil80 <arch...@inbox.com <javascript:>> a
écrit :

Hi,

I'm new to ES and I'm start building a web application based on it.

I've read that Faces allows to filter the result of a query, but in a web
scenario after I bind the first result query to a control (let say a table)
if I want to filter it with the Facets I have to re-run my query ?
What is the common architecture use ?

I think it's not a good idea to store the result of the query in the user
session.

I just want to start with develping a simple web page to discover the
power of ES and understand how it can interact with a web application.

Thanks

--

--

I would say: "it depends!" :wink:

On my laptop, I built a demo with 1,3 m docs (more than 100 fields) with 5
facets (Terms, Range, Date histogram).
When computing on the full dataset, I get results in about 8-10 seconds.
When adding a query on top of it (and reduce my data set to 100k docs), I get
results in less than a second.

On a Laptop and with only 1,5 Gb allocated to the JVM ! It was just amazing.

With a real server (64 Gb RAM with 32 Gb for ES), you will get really better
performance and you will be able to handle more documents :wink:

Yes, you can build your application from every langage as everything is standard
in Elasticsearch (REST API)...

HTH
David.

Le 30 novembre 2012 à 14:44, evil80 archivio@inbox.com a écrit :

I need to develop a web application that allow a user to search.
The application will start with 10TB of data must have a realtime response.

The search engine will be so simple, at the beginning.
Imagine to have a document with these field :
* Data
* Branch code
* Article number
* Sell price

I have to give to a user a web page in which he can simply enter the value
and return all the matches document.

Do you think ES can handle this volume of data ? Millions of documents for an
initial size of 10TB.

I'm going to use .NET to develop the frontend because it's my favorite
platform (I'm evaluating to use bootstrap as your demo too).

What kind of query can better perform on ES in this scenario ?
Facets can be return together with the main query and applied in a second
time on the client ?

I've seen that your example is developed in Javascript, it could be difficult
to build something like that with a server-side technology like Asp.NET ?

Thanks a lot!
Il giorno venerdì 30 novembre 2012 09:33:14 UTC+1, David Pilato ha scritto:

Have a look at my JUG/Devoxx demo web site :
http://www.pilato.fr/devoxxfr_demo/ http://www.pilato.fr/devoxxfr_demo/
http://www.pilato.fr/devoxxfr_demo/
Source code is here: http://www.pilato.fr/devoxxfr_demo/
https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
It could help to build your demo (or you can use it as is)
https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
HTH
https://github.com/dadoonet/devoxxfr_demo
--
David :wink: https://github.com/dadoonet/devoxxfr_demo
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 30 nov. 2012 à 09:20, evil80 <
https://github.com/dadoonet/devoxxfr_demo arch...@inbox.com> a écrit :

   > > >        Hi,
   I'm new to ES and I'm start building a web application based on it.

   I've read that Faces allows to filter the result of a query, but in

a web scenario after I bind the first result query to a control (let say a
table) if I want to filter it with the Facets I have to re-run my query ?
What is the common architecture use ?

    I think it's not a good idea to store the result of the query in

the user session.

   I just want to start with develping a simple web page to discover

the power of ES and understand how it can interact with a web application.

   Thanks



   --

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

Ok! It's seem to be wonderful!

If I'm not boring you I want to understand the main architecture, I'm going
to build something like this :

  • Asp.NET Frontend
  • I build a request for ES and get the result (maybe using NEST and not
    JSon directly)
  • Bind the result to the user on table, charts and so on

It's a good way for ES or there are some "best practices" ?

With this type of data :

  • Datetime
  • Branch code
  • Article number
  • Sell price

How can Facets improve the user experience ?
I'm reading about that but I can't really understand what facets filter,
facets histogram and so on can help me in developing this.

Really, really thanks!
Il giorno venerdì 30 novembre 2012 15:33:12 UTC+1, David Pilato ha scritto:

I would say: "it depends!" :wink:

On my laptop, I built a demo with 1,3 m docs (more than 100 fields) with
5 facets (Terms, Range, Date histogram).
When computing on the full dataset, I get results in about 8-10 seconds.
When adding a query on top of it (and reduce my data set to 100k docs), I
get results in less than a second.

On a Laptop and with only 1,5 Gb allocated to the JVM ! It was just
amazing.

With a real server (64 Gb RAM with 32 Gb for ES), you will get really
better performance and you will be able to handle more documents :wink:

Yes, you can build your application from every langage as everything is
standard in Elasticsearch (REST API)...

HTH
David.

Le 30 novembre 2012 à 14:44, evil80 <arch...@inbox.com <javascript:>> a
écrit :

I need to develop a web application that allow a user to search.
The application will start with 10TB of data must have a realtime
response.

The search engine will be so simple, at the beginning.
Imagine to have a document with these field :

  • Data
  • Branch code
  • Article number
  • Sell price

I have to give to a user a web page in which he can simply enter the value
and return all the matches document.

Do you think ES can handle this volume of data ? Millions of documents for
an initial size of 10TB.
I'm going to use .NET to develop the frontend because it's my favorite
platform (I'm evaluating to use bootstrap as your demo too).

What kind of query can better perform on ES in this scenario ?
Facets can be return together with the main query and applied in a second
time on the client ?

I've seen that your example is developed in Javascript, it could be
difficult to build something like that with a server-side technology like
Asp.NET ?

Thanks a lot!
Il giorno venerdì 30 novembre 2012 09:33:14 UTC+1, David Pilato ha
scritto:

Have a look at my JUG/Devoxx demo web site :
http://www.pilato.fr/devoxxfr_demo/
http://www.pilato.fr/devoxxfr_demo/
Source code is here: http://www.pilato.fr/devoxxfr_demo/
https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
It could help to build your demo (or you can use it as is)https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
HTH
https://github.com/dadoonet/devoxxfr_demo

David :wink: https://github.com/dadoonet/devoxxfr_demo
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 30 nov. 2012 à 09:20, evil80 <https://github.com/dadoonet/devoxxfr_demo
arch...@inbox.com> a écrit :

Hi,

I'm new to ES and I'm start building a web application based on it.

I've read that Faces allows to filter the result of a query, but in a web
scenario after I bind the first result query to a control (let say a table)
if I want to filter it with the Facets I have to re-run my query ?
What is the common architecture use ?

I think it's not a good idea to store the result of the query in the user
session.

I just want to start with develping a simple web page to discover the
power of ES and understand how it can interact with a web application.

Thanks

--

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

Sounds good to me.

With facets, you can help the user click on it and filter then the first results
(and digg into your documents). If you click on facets on my demo, you will see
this in action.
A common use case is the commerce web site. You should read this wonderful post
from Karel (aka Karmi)


I learned everything about facets from this article.

For your data, it depends on what you want to show to your users.
That said, I think that Date Histogram will be useful for your Datetime values,
Term Facet for your Branch code, Range facet for Sell price.
I don't understand what are article numbers or if I understood well (it's a
unique number/id ?), I can't see a facet for it.

Does it help?
David.

Le 30 novembre 2012 à 15:45, evil80 archivio@inbox.com a écrit :

Ok! It's seem to be wonderful!

If I'm not boring you I want to understand the main architecture, I'm going
to build something like this :
* Asp.NET Frontend
* I build a request for ES and get the result (maybe using NEST and not
JSon directly)
* Bind the result to the user on table, charts and so on

It's a good way for ES or there are some "best practices" ?

With this type of data :

 * Datetime
 * Branch code
 * Article number
 * Sell price

How can Facets improve the user experience ?
I'm reading about that but I can't really understand what facets filter,
facets histogram and so on can help me in developing this.

Really, really thanks!

Il giorno venerdì 30 novembre 2012 15:33:12 UTC+1, David Pilato ha scritto:

I would say: "it depends!" :wink:

On my laptop, I built a demo with 1,3 m docs (more than 100 fields) with
5 facets (Terms, Range, Date histogram).
When computing on the full dataset, I get results in about 8-10 seconds.
When adding a query on top of it (and reduce my data set to 100k docs), I
get results in less than a second.

On a Laptop and with only 1,5 Gb allocated to the JVM ! It was just
amazing.

With a real server (64 Gb RAM with 32 Gb for ES), you will get really
better performance and you will be able to handle more documents :wink:

Yes, you can build your application from every langage as everything is
standard in Elasticsearch (REST API)...

HTH
David.

Le 30 novembre 2012 à 14:44, evil80 < arch...@inbox.com> a écrit :

> > > I need to develop a web application that allow a user to search.
The application will start with 10TB of data must have a realtime

response.

The search engine will be so simple, at the beginning.
Imagine to have a document with these field :
    * Data
    * Branch code
    * Article number
    * Sell price

I have to give to a user a web page in which he can simply enter the

value and return all the matches document.

Do you think ES can handle this volume of data ? Millions of documents

for an initial size of 10TB.

I'm going to use .NET to develop the frontend because it's my favorite

platform (I'm evaluating to use bootstrap as your demo too).

What kind of query can better perform on ES in this scenario ?
Facets can be return together with the main query and applied in a

second time on the client ?

I've seen that your example is developed in Javascript, it could be

difficult to build something like that with a server-side technology like
Asp.NET ?

Thanks a lot!
Il giorno venerdì 30 novembre 2012 09:33:14 UTC+1, David Pilato ha

scritto:
> > > > Have a look at my JUG/Devoxx demo web site :

  http://www.pilato.fr/devoxxfr_demo/

http://www.pilato.fr/devoxxfr_demo/
http://www.pilato.fr/devoxxfr_demo/
http://www.pilato.fr/devoxxfr_demo/
http://www.pilato.fr/devoxxfr_demo/
Source code is here: http://www.pilato.fr/devoxxfr_demo/
https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
It could help to build your demo (or you can use it as is)
https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
HTH
https://github.com/dadoonet/devoxxfr_demo
--
David :wink: https://github.com/dadoonet/devoxxfr_demo
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

  Le 30 nov. 2012 à 09:20, evil80 <

https://github.com/dadoonet/devoxxfr_demo arch...@inbox.com> a écrit :

      > > > > >           Hi,
      I'm new to ES and I'm start building a web application based

on it.

      I've read that Faces allows to filter the result of a query,

but in a web scenario after I bind the first result query to a control
(let say a table) if I want to filter it with the Facets I have to
re-run my query ?
What is the common architecture use ?

       I think it's not a good idea to store the result of the

query in the user session.

      I just want to start with develping a simple web page to

discover the power of ES and understand how it can interact with a web
application.

      Thanks



      --



  > > > >     > > > 
--

--
David Pilato
http://www.scrutmydocs.org/ http://www.scrutmydocs.org/
http://dev.david.pilato.fr/ http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

Hi,

really really interesting!
Now I have understood what Facets are...cool!

So each time user ask for a particolar Facets this would be a call to ES ?
Facets can work on the over data set and returned indepently by the current
query ?

Really thanks a lot!

Il giorno venerdì 30 novembre 2012 18:33:03 UTC+1, David Pilato ha scritto:

Sounds good to me.

With facets, you can help the user click on it and filter then the first
results (and digg into your documents). If you click on facets on my demo,
you will see this in action.
A common use case is the commerce web site. You should read this
wonderful post from Karel (aka Karmi)
http://www.elasticsearch.org/blog/2011/05/13/data-visualization-with-elasticsearch-and-protovis.html

I learned everything about facets from this article.

For your data, it depends on what you want to show to your users.
That said, I think that Date Histogram will be useful for your Datetime
values, Term Facet for your Branch code, Range facet for Sell price.
I don't understand what are article numbers or if I understood well (it's
a unique number/id ?), I can't see a facet for it.

Does it help?
David.

Le 30 novembre 2012 à 15:45, evil80 <arch...@inbox.com <javascript:>> a
écrit :

Ok! It's seem to be wonderful!

If I'm not boring you I want to understand the main architecture, I'm
going to build something like this :

  • Asp.NET Frontend
  • I build a request for ES and get the result (maybe using NEST and
    not JSon directly)
  • Bind the result to the user on table, charts and so on

It's a good way for ES or there are some "best practices" ?

With this type of data :

  • Datetime
  • Branch code
  • Article number
  • Sell price

How can Facets improve the user experience ?
I'm reading about that but I can't really understand what facets filter,
facets histogram and so on can help me in developing this.

Really, really thanks!
Il giorno venerdì 30 novembre 2012 15:33:12 UTC+1, David Pilato ha
scritto:

I would say: "it depends!" :wink:

On my laptop, I built a demo with 1,3 m docs (more than 100 fields) with
5 facets (Terms, Range, Date histogram).
When computing on the full dataset, I get results in about 8-10 seconds.
When adding a query on top of it (and reduce my data set to 100k docs), I
get results in less than a second.

On a Laptop and with only 1,5 Gb allocated to the JVM ! It was just
amazing.

With a real server (64 Gb RAM with 32 Gb for ES), you will get really
better performance and you will be able to handle more documents :wink:

Yes, you can build your application from every langage as everything is
standard in Elasticsearch (REST API)...

HTH
David.

Le 30 novembre 2012 à 14:44, evil80 < arch...@inbox.com> a écrit :

I need to develop a web application that allow a user to search.
The application will start with 10TB of data must have a realtime
response.

The search engine will be so simple, at the beginning.
Imagine to have a document with these field :

  • Data
  • Branch code
  • Article number
  • Sell price

I have to give to a user a web page in which he can simply enter the value
and return all the matches document.

Do you think ES can handle this volume of data ? Millions of documents for
an initial size of 10TB.
I'm going to use .NET to develop the frontend because it's my favorite
platform (I'm evaluating to use bootstrap as your demo too).

What kind of query can better perform on ES in this scenario ?
Facets can be return together with the main query and applied in a second
time on the client ?

I've seen that your example is developed in Javascript, it could be
difficult to build something like that with a server-side technology like
Asp.NET ?

Thanks a lot!
Il giorno venerdì 30 novembre 2012 09:33:14 UTC+1, David Pilato ha
scritto:

Have a look at my JUG/Devoxx demo web site :
http://www.pilato.fr/devoxxfr_demo/
http://www.pilato.fr/devoxxfr_demo/
http://www.pilato.fr/devoxxfr_demo/ http://www.pilato.fr/devoxxfr_demo/
Source code is here: http://www.pilato.fr/devoxxfr_demo/ https://github.com/dadoonet/devoxxfr_demo

https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo https://github.com/dadoonet/devoxxfr_demo
It could help to build your demo (or you can use it as is)https://github.com/dadoonet/devoxxfr_demo
https://github.com/dadoonet/devoxxfr_demo
HTH
https://github.com/dadoonet/devoxxfr_demo

David :wink: https://github.com/dadoonet/devoxxfr_demo
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 30 nov. 2012 à 09:20, evil80 <https://github.com/dadoonet/devoxxfr_demo
arch...@inbox.com> a écrit :

Hi,

I'm new to ES and I'm start building a web application based on it.

I've read that Faces allows to filter the result of a query, but in a web
scenario after I bind the first result query to a control (let say a table)
if I want to filter it with the Facets I have to re-run my query ?
What is the common architecture use ?

I think it's not a good idea to store the result of the query in the user
session.

I just want to start with develping a simple web page to discover the
power of ES and understand how it can interact with a web application.

Thanks

--

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--