pantheon-systems / solr-power

A WordPress plugin to connect to Pantheon's Apache Solr search infrastructure, or your own!
https://wordpress.org/plugins/solr-power/
GNU General Public License v2.0
126 stars 61 forks source link

Display hierarchy taxonomy terms as nested in faceting widget #413

Open Naresh206 opened 5 years ago

Naresh206 commented 5 years ago

Hi,

We are trying to build hierarchical taxonomy facets. Please, this is a custom taxonomy. We need to have 3 levels of hierarchy with this. Is this supported with solr power. Can you please share thoughts or code examples would be great.

danielbachhuber commented 5 years ago

Hi @Naresh206,

We need to have 3 levels of hierarchy with this. Is this supported with solr power.

It should be possible, yes.

Can you please share thoughts or code examples would be great.

It should work without any additional configuration. If you run into specific questions, feel free to drop them here and we'll do what we can do answer them.

Naresh206 commented 5 years ago

Hi,

Taxonomy is coming in the front end but I cannot see hierarchy in the front end.

Here is the screenshot of how custom taxonomy is built Screenshot1

Here is the screenshot how taxonomy facets are seen on the front end Screenshot2

Here is the screenshot of HTML, where they are all building as single li items Screenshot3

Here is my facet options screenshot screenshot4

Am I missing something and can you please help me

Naresh206 commented 5 years ago

Hi @Naresh206,

We need to have 3 levels of hierarchy with this. Is this supported with solr power.

It should be possible, yes.

Can you please share thoughts or code examples would be great. Hi,

Taxonomy is coming in the front end but I cannot see hierarchy in the front end.

Here is the screenshot of how custom taxonomy is built Screenshot1

Here is the screenshot how taxonomy facets are seen on the front end Screenshot2

Here is the screenshot of HTML, where they are all building as single li items Screenshot3

Here is my facet options screenshot screenshot4

Am I missing something and can you please help me

It should work without any additional configuration. If you run into specific questions, feel free to drop them here and we'll do what we can do answer them.

danielbachhuber commented 5 years ago

@Naresh206 It looks like the faceting widget doesn't support hierarchy right now. We can re-open this issue and consider it for a future release. Feel free to submit a pull request with support if you'd like.

Naresh206 commented 5 years ago

Hi, We want to do a custom range search on a date, for example, post_date from now+6 months programmatically Another use case may be sorting the price custom field from $1000 to $2000

Can you please give an example to do this and help