coldfusion 11 Search Filtering - coldfusion

I am trying to accomplish a Search Filtering system in ColdFusion 11 and I am not sure the way around this, if there was a plugin then even better.
eg:
http://www.pcworld.co.uk/gbuk/search-keywords/xx_xx_xx_xx_xx/mouse/xx-criteria.html
I am trying to achieve the sub filters on the left, I have tried playing about with queries of queries but with URL strings etc its getting messy.
Any pointers would be appreciated.

Related

Google Analytic Search and replace according to list

Scenario:
In Google Analytic, I notice that it is possible to replace certain URI parameter to words that you want by using search and replace filter like the following example below.
e.g. www.example.com/abc/product_id=3 -----> www.example.com/abc/product_name=shampoo
Problems:
Currently I've got a list of over 1000 products in my hand, instead of creating 1000 search and replace filter, what would be the most efficient and maintainable way to go solve the problem?
I've done some digging and notice that custom dimension could be the solution, however it would require me to modify the the JS code on the FTP sever which I dont have permission on. What other solutions do I have?
If it is not possible to show it here would there be any kind of tutorial that I could follow through?
Really appreciate for the help, Many Thanks
This is not a complete answer, but it's certainly more than a comment.
Besides the tedium of writing this out by hand, I can think of two options available to you.
Firstly, you could use the Google Analytics Management API (https://developers.google.com/analytics/devguides/config/mgmt/v3/). By constructing a set of commands, you could quickly iterate through your list and create the required 1,000 search and replace filters.
Secondly, if you were to use Google Tag Manager you would be able to create a Custom JavaScript Variable that takes the page path and compares it to your list. This variable could then replace the Page field before the hit data is sent to Google Analytics. This may sound more complicated, but it would allow you to pull your solution out of Google Analytics and into the flexible world of JavaScript.
Note that if you rewrite the product_id to a product_name once, you will have to maintain that cross reference every day and keep it in sync with what appears on the website -- make sure you have an automated solution or it will quickly get out-of-sync and be more of a mess than before.
An alternative is to do the search-and-replace on the reporting side.
I know Analytics Edge or Analytics Canvas products could easily do this, or you could just download into Excel or Google Sheets and do a series of lookup formulae.

Easiest/quickest way to implement URL rewrite in Coldfusion 10

I would simply like URLS that are in the format www.mysite.com/blog to be rewritten to www.mysite.com/blog.cfm.
So, another example:
www.mysite.com/contact
would be rewritten as:
www.mysite.com/contact.cfm
What is the easiest and quickest way to implement this sort of url rewriting in Coldfusion 10 running Tomcat? Google seems to offer an array of complicated options and pages and people struggling with this, so I'm just wondering if there is a basic way to do this.
Thanks
I have used the Tuckey UrlRewriteFilter in the past with Tomcat, works great.

Pull multiple attributes from WMI

Is is possible to query multiple WMI sources like you can multiple tables in SQL?
#"SELECT Win32_Process.ExecutablePath, Win32_Process.Handle, Win32_Process.Name, Win32_PerfFormattedData_PerfProc_Process.WorkingSetPrivate, Win32_PerfFormattedData_PerfProc_Process.PercentProcessorTime FROM Win32_Process, Win32_PerfFormattedData_PerfProc_Process
This didn't work but hopefully you get the idea. I've searched around and I couldn't even find anyone asking this question. I'm guessing it's not possible but I thought I'd try the experts here before giving up.
No you can't. The WQL language is just a subset of SQL and doesn't supports querys over multiples classes at the same time. Instead you can try the ASSOCIATORS OF sentence, but only in some scenarios.

Django Haystack a good fit for this type of search?

I have an application that lists jobs within a certain location using spatial search. It is a fairly simple search with a few filters (date range, job type, etc) no large text to search. I was considering using something like Haystack with solr to do the search, is it worth the overhead or should I just query the database?
This sort of thing can be easily handled via Solr (or any of Haystack's other backends), but if you start with your database (see Django Filter for ideas to make this easy via URLs), and then shift to a search engine when the need arises (based on load), you'll thank yourself later for not introducing more complexity early on.
When you do add the search engine, whichever you use, definitely use Haystack as the API, unless you go with Sphnix, in which case maybe see this blog post.

Django Haystack substring search

I have recently added search capabilities to my django-powered site to allow employers to search for employees using keywords. When the user initially uploads their resume, I turn it into text, get rid of stop words, and then add the text to a TextField for that user. I used Django-Haystack with the Whoosh search back engine.
Three things-
1) Aside from extra features which I'll probably not use, is there any concrete advantage to switching to Solr or Xapian?
2) In turning the resume into text, I essentially index the pdf myself. I know both Xapian and Solr support .pdf indexing, however, from the looks of it Haystack does not. Any tips on how to get around this? Or should I keep indexing it myself? If so, should I be doing more than simply providing a text file of keywords?
3) Whoosh only return a result if the keyword matches itself exactly. If a user has 'mathematics' as his keyword, and I search 'math', I want that user to appear. I couldn't definitively tell whether Xapian or Solr support this. Thoughts?
Thanks for any suggestion. I'm going to continue digging into this myself for the time being.
Unfortunately I don't know enough to answer your other questions, however for point 3.) Whoosh actually does support this.
You would have to use the autocomplete function of SearchQuerySet.
Detailed here:
http://docs.haystacksearch.org/dev/autocomplete.html
I'm currently using Whoosh and matching on partial matches myself.