tracker issue : CF-3785874

select a category, or use search below
(searches all categories and all time range)
Title:

CategoryTree not working in ColdFusion 10

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Scott Stroz / Scott Stroz (Scott Stroz)

Created: 07/07/2014

Components: Text Search, Solr

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 5

Listed in the version 2016.0.03.300466 Issues Fixed doc
Problem Description:
When adding or updating a record in an index, the categoryTree does not get populated.
Steps to Reproduce:
Create an index, populate index with a value for categoryTree
<cfindex action="update" 
collection="myCollection" 
key="#keyVar#" 
body ="#bodyVar#"
title="#titleVar#"
category = "Category"
categoryTree ="CategoryTree
autocommit="true" 
status="status"
type="custom">

Actual Result:
All results from searches of index will return an empty string in category tree.

Expected Result:
Records where categoryTree was set should not have an empty string.

Any Workarounds:
None.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3785874

External Customer Info:
External Company:  
External Customer Name: Scott Stroz
External Customer Email:  
External Test Config: My Hardware and Environment details:

Windows 7

ColdFusion 10,0,13,287689

Attachments:

Comments:

I am unable to reproduce the issue with CF10 update13 on Win 7x64 (test code at the end of this note). The dumped query has the "categorytree" field populated with the right string. @Scott, can you pls. confirm if you have the latest updated applied. If you are still able to repro this, can you share a working test code. Test code: <cfset col_name = "test_coll_cattree"> <cfcollection action="list" name="lst_col" engine="solr"> <cfset col_lst = ValueList(lst_col.NAME, ",")> <cfif ListContains( col_lst, "#col_name#") EQ 0> <cfcollection action = "create" collection = "#col_name#" engine = "solr" path = "#expandpath(".")#\colData"> </cfif> <cfset filename = "#Expandpath(".")#\colSrcFiles"> <cfindex action='update' collection='#col_name#' type='path' key='#filename#' categoryTree="ww/apac/aus" extensions = ".docx, .doc, .rtf, .pdf, .txt, .htm" urlpath='http://localhost:82/col_solr'> <cfset search_str = "some str"> <cfsearch name="srch_test" collection="#col_name#" criteria= "#search_str#"> search result... <br> <cfdump var="#srch_test#">
Comment by Piyush K.
11681 | August 06, 2014 08:48:36 AM GMT
unable to reproduce the issue with the test case below. The category and categorytree, columns are populated in the output search query. (a partial record from the query output at the end of this note) Pls. feel free to revert if there are any discrepancies. <cfset path_seperator = IIF(FindNoCase(server.os.name,"windows"), DE("\"), DE("/"))> <cfset col_name = "test_col"> <cfcollection action="list" name="lst_col" engine="solr"> <cfset col_lst = ValueList(lst_col.NAME, ",")> <cfif ListContains(col_lst, "#col_name#") EQ 0> <cfcollection action = "create" collection = "#col_name#" engine = "solr" categories = "true" path = "#expandpath(".")##path_seperator#col"> </cfif> <cfset col_lst = ValueList(lst_col.NAME, ",")> <cfset q = queryNew("key,title,body,cat")> <cfset queryAddRow(q, {key:1,title:"History title one", body:"b1", cat:"sports"})> <cfset queryAddRow(q, {key:2,title:"History title two", body:"b2", cat:"sports"})> <cfset queryAddRow(q, {key:3, title:"History title three", body:"b3", cat:"sports"})> <cfset queryAddRow(q, {key:4, title:"History title four", body:"b4", cat:"music"})> <cfindex action="update" collection="#col_name#" query="q" key="key" title="title" body="body" category="music" categorytree ="books/history" status="r"> <cfdump var="#r#"> <cfset q = queryNew("key,title,body,cat")> <cfset queryAddRow(q, {key:5,title:"English history title one", body:"b1", cat:"sports"})> <cfset queryAddRow(q, {key:6,title:"English history title two", body:"b2", cat:"sports"})> <cfset queryAddRow(q, {key:7, title:"English history title three", body:"b3", cat:"sports"})> <cfset queryAddRow(q, {key:8, title:"English history title four", body:"b4", cat:"music"})> <cfindex action="update" collection="#col_name#" query="q" key="key" title="title" body="body" category="music" categorytree ="books/history/english" status="r"> <cfdump var="#r#"> <cfsearch collection="#col_name#" name="x" criteria="title" category="music" categorytree="books/history/english"> <cfdump var="#x#"> output: AUTHOR CATEGORY CATEGORYTREE CATEGORYTREEDATA CONTEXT 1 [empty string] music books/history/english books/history/english [empty string]
Comment by Piyush K.
11682 | September 20, 2014 08:24:27 AM GMT
I have gotten to the bottom of why this issue happens. Please see https://forums.adobe.com/thread/1686454. Also, please note that if the tech on this issue had actually tested the code submitted by Scott Stroz, they WOULD have been able to reproduce the issue. Techs should use submitted code as a starting point, not their own assumptions about how code should be written.
Comment by External U.
11683 | February 12, 2015 05:54:04 PM GMT
I have to echo John's comment here. The tester did NOT replicate the issue as reported by Scott. When testing with a query passed to cfindex, it works, but when testing with static data, it is reproducible immediately. If you look at this Gist, https://gist.github.com/cfjedimaster/a21aaec469c496f3d6d0, you can see the last search fail to work when categorytree is used. If you change critiera to news, it works. If you keep it at beer and remove categorytree, it works. This is definitely a bug still in ColdFusion 11.
Comment by External U.
11684 | February 13, 2015 08:21:13 AM GMT
[subscribe] Adobe sux for forcing the VOTE option to require min. 25 chars.
Vote by External U.
11691 | February 14, 2015 03:39:35 PM GMT
Minor as it is happening only for plain text passed as body. Files and queries are working. Moving it to 13
Comment by Uday O.
11685 | October 29, 2015 05:06:37 AM GMT
This is not minor. Using cfindex and not using cfquery is a supported feature and not just a minor thing. Delaying this until CF13 means, approximately, 2016 or 2017 or so which is not acceptable. There are 4 types of indexing according to the docs: file, path, dih, and custom (query). Right now it could be failing for 3/4ths of that. At minimum, if the query argument does NOT have a value and categoryTree has a value, throw an error. That should take five minutes to code and the user will be "surprised" when his or her code doesn't work. Below that, also update the docs to make it clear this doesn't work. But honestly - don't delay this this 13. This is a feature added in CF7. It should be fixed for 12 and should be hot fixed for 11.
Comment by External U.
11686 | October 29, 2015 05:18:59 AM GMT
Not sure how this can be classified as a minor bug either. The only time we use queries to populate a collection, is if they need to be completely re-built from scratch. In most circumstances, we manually index single entries as they're processed. I doubt we're unique in this approach.
Comment by External U.
11687 | October 29, 2015 06:19:47 AM GMT
+1 .
Vote by External U.
11692 | October 29, 2015 06:20:06 AM GMT
And this should be fixed for all supported versions of ColdFusion--which includes CF10.
Comment by External U.
11688 | October 29, 2015 06:20:40 AM GMT
Push a fix for this off 3 versions? That is asinine. This is not 'minor' by any stretch of the imagination. By pushing it off to 13, you will effectively NOT fix it for 10 as 10 will likely be EOL'd by then.
Comment by External U.
11689 | October 29, 2015 07:54:50 AM GMT
Agree with everyone here. These sort of things need to be fixed in the version they were logged against, and they need to be fixed *in a timely fashion*. The boat has sailed on the latter, but the former can still be rectified.
Comment by External U.
11690 | October 29, 2015 11:31:51 AM GMT
+1. . . . . . . . . . . . . . . . . .
Vote by External U.
11693 | October 29, 2015 04:43:01 PM GMT
+1................................................
Vote by External U.
11694 | November 17, 2015 03:41:18 PM GMT
+1 - This really is not minor.
Vote by External U.
11695 | December 05, 2015 03:04:50 AM GMT