Developer forum

Forum » Development » Retrieve all results of a query publisher list

Retrieve all results of a query publisher list

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a situation where I need to create a list of users that can be filtered using facets and at the same time a map displaying the results of the filter.
The main list should have pagination while the Map should display the entire list.

The implementation relies on the QueryPublisher module.

Is there any way I can get the entire list of results even when setting a page size?

Thank you,
Adrian


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You can do 2 lists. One with all for the map and one that is paged. Or since you are getting all users anyways, you can do the paging in the frontend.

Alternatively you can get the dots for the map using the delivery API as that can also return from the query publisher

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you for the answer. I have considered 2 lists but the way they have to be integrated into the interface is not ideal.

I ended up with a piece of code in the QueryPublisher list for retrieving the dataset with Dynamicweb.Indexing.Querying.QueryService().

It seems to work very well even with a large number of users.

Thank you,

Adrian

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

I've had similar challenges.

 

Consider how that's going to grow. Some customers had to finally give in to using a paged result (and/or sort of a type-ahead) because the browser was not handling the load. It was too much markup to "paint" (even if empty), and that was destroying the UX. Once they saw that with their own eyes, it was simpler to change their minds (and charge twice for the same work :P )

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum