Numeric and Timestamp Filters

Submitted by cmathis430 on Fri, 2009-01-09 07:39.Troubleshooting

Hi,

I created my own interface for numberic and timestamp filters by modifying the narrowBy.ftl, however, I seem to have a problem with the searchResult.filterResult.filteredColumns object as it does not recognize filters from the query if they do not have a double quote around the value.

Query Examples:
A) revChange:[5000,)
B) revChange:"[5000,)"

While A works as far as searching goes, it is not recognized by the filteredColumns object. However, while B does not work as far as searching goes, it is recognized by the filteredColumns object.

What am I supposed to do? Is there a way for B to work for searching? If not, is there a way for the filteredColumns object to recognize filters without quotes? Either would be fine with me, I just need either one to work in both cases: searching and recognizing filters.

Thanks for your help!

-Charlie

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Submitted by will on Fri, 2009-01-09 12:33.

Option A should work and be recognized as filteredColumns.

Do you use the WEB-INF/conf/facet-types.xml to create the narrowBy search?

Maybe send us the index configuration file downloaded from the dashboard and the WEB-INF/conf/facet-types.xml you are using.

email to dbsight at gmail.com

Submitted by cmathis430 on Fri, 2009-01-09 14:03.

You're right, it is recognized and I can find it in searchResult.filterResult.filteredColumns, but I think the value isn't properly parsed:

For the query examples I used, I get the following value in searchResult.filterResult.filteredColumns.filteredColumn.value:

A) filteredColumn.value = [5000,0)
B) filteredColumn.value = "[5000,)"

So when filteredColumn.removeSelf(searchResult.request) goes to remove itself, it is trying to remove [5000,0) rather than [5000,) so it obviously can't find itself because of the extra zero.

I also notice that when I search for revChange:[12,13], it comes back as revChange:[12,13) in the filteredColumn.value. Is there a reason the inclusivity and exclusivity is changed?

Also, I did not edit the facet-types.xml, I just set the column as filtered and modified the narrowBy.ftl file.

I zipped up my index configuration and emailed it to you, too. RE: cmathis430: Template Files for Forum Post "Numeric and Timestamp Filters"

Thanks!

Submitted by will on Fri, 2009-01-09 17:24.

Fixed in latest 2.0.8 beta. Thanks!