I went to the Web Administrator > Services > Search.
I manually create a collection with:
name "articoli"
path (a fake one, e.g. /tmp)
Italian language
Then in my indexer template:
<cfquery name="qry">
SELECT * FROM articoli
</cfquery>
<cfindex action="update"
collection="articoli"
key="artid"
type="custom"
title="artcod"
query="qry"
body="artdes" />
Result: collection articoli is undefined
Any ideas? Other ways for indexing with RAILO+Lucene?
EDIT:
I am using Railo 3.3 (old version). Is this kind of indexing available?
Checking the Railo source for v3.3 indicates that the error "collection articoli is undefined" will occur if the collection named doesn't exist - a simple search reveals only one instance of a "collection X is undefined" error message).
This suggests that either the name does not match what you typed into the web administrator, or that you created the articoli collection in a different web administrator to where you are running the code.
Related
In BigQuery console I created a UDF function (language js) and now trying to call it from a saved query. I tried referencing the UDF with projectID.dataset.UDF_Name (same as I am using the for referencing vies/tables). When I click Run in UI I got an error:
"The project XXX has not enabled BigQuery"
I checked the BigQuery API and it says enabled.
When I only used dataset.UDF_Name for reference the query worked but I can save it as view getting another error: Bad routine reference "dataset.UDF_Name()"; routine references in standard SQL views require explicit project IDs
So clearly, the right approach is to use the projectID.dataset.UDF_Name() format but I can't figure out how to get rid of the "The project XXX has not enabled BigQuery" error.
Any help, much appreciated.
I need to get the value "8.37" from the "data-rating" attribute.
<div class="ch-rating"> "VERYGOOD 8.37"
<div class="star-rating star-rating--alt star-rating--ch" data-rating="8.37" style="">
<span style="width: 83.7%;"></span>
</div>
</div>
In java there is .getAttribute() but I can't find the syntax in VBA.
I guess its something like this:
bot.FindElementByXPath("//div[#data-rating]"). followed by some syntax.
To get the value "8.37" from the "data-rating" attribute you can use the following line of code :
bot.FindElementByXPath("//div[#class='ch-rating']/div[#class='star-rating star-rating--alt star-rating--ch']").getAttribute("data-rating")
Update 1
HtmlElement.GetAttribute Method (String)
Syntax :
var attribute = element.getAttribute(attributeName);
where
attribute is a string containing the value of attributeName.
attributeName is the name of the attribute whose value you want to get.
Update 2 :
As you are seeing Run-time error 438: Object doesn't support this property or method for HtmlElement.GetAttribute Method (String) here are some details :
Error 438 occurs when running a program in which a form is assigned to a variable and that variable is used to access a control on the form if the program is on a system running Windows 95 with Regional Settings set to a setting other than English (United States). The error text is:
Run-Time Error #438:
Object doesn't support this property or method
Resolution
There are two possible workarounds for this problem.
Access the form directly rather than by a variable containing the form.
Create property procedures in the form's code to provide access to the properties of the controls on the form.
Status
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been fixed in Windows 98.
Trivia
To reproduce this bug consistently, you will need HeapWalker, a utility that ships with the Windows 16-bit Software Development Kit and the 16-bit version of Visual C++.
Steps to Reproduce :
From Control Panel, click Regional Settings to open the Regional Settings dialog box. Set the Regional Settings to English (Australian).
Start the 16-bit edition of Visual Basic 4.0. If it is already running, select New Project from the File menu.
Source : FIX: Error 438"Object Doesn't Support This Property or Method"
I'm suddenly getting NullPointerException in the sites.html link on the author in Adobe Experience Manager, Version 6.0.0.SP3
Any ideas? Please help.
Internal Server Error
Cannot serve request to /sites.html/content in /libs/cq/gui/components/siteadmin/admin/pagecard/pagecard.jsp
Exception:
java.lang.NullPointerException
at org.apache.jsp.libs.cq.gui.components.siteadmin.admin.pagecard.pagecard_jsp.getCommentCount(pagecard_jsp.java:99)
...
We found missing jcr:content nodes for some pages under /content.
Some existing jcr:content nodes were missing jcr:title property.
We added the missing jcr:content nodes and jcr:title property.
This solved the issue.
Note:
The root of any of the sites (specifically sub-sites) should contain the following within their jcr:content –
1. Title
2. cq:allowedTemplates - to define the templates that go with this site specifically.
3. designPath – which defines the clientlibs for the site and can contain options for the sidekick.
Go to crx-quickstart folder in your file system and search for pagecard_jsp.java.
What is on line 99? I have a different version but I guess it is this line:
Resource commentsResource = page.getContentResource().getChild("alt/comments");
If this line throws a NPE, it means that one of the top-level pages under /content is missing jcr:content node or the node is corrupted.
It is just a wild guessing without details.
I think we need to add the property under /content/your-folder/jcr:content as**:
jcr:title : give the exact name . Click on add and save all.
I am attempting to list certain sections of an app pool in IIS. I already have the script to set the attribute but haven't been able to find the one to list it. For example, to set the Rapid-Fail Protection to "true", I use:
appcmd set config -section:system.applicationHost/applicationPools "/[name='$appPool'].failure.rapidFailProtection:true" /commit:apphost
where $appPool is the name of your app. This method works fine. However, if I change it to something like:
appcmd list config -section:system.applicationHost/applicationPools "/[name='$appPool'].failure.rapidFailProtection"
It fails with
ERROR ( message:The attribute "[name='$appPool'].failure.rapidFailProtection" is not supported in the current command usage. )
I also tried a few variations such as the following but they had the same error:
appcmd list apppool $appPool /section:failure.rapidFailProtection
I believe I found the answer to my own question just via a different avenue. I was able to view the values using the following syntax:
$appPool = "AppPool1"
(Get-Item "IIS:\AppPools\$appPool").failure.rapidFailProtection
Using the $appPool variable I can create a loop to pull the values for each app pool.
I use Alfresco 4.1 with Lucene enabled. I have a folder of type 'myfoldertype' and named 'one two'. Tokenization on the name is (by default) enabled.
I search by name on a specific type of folder, via my own Java backed webscript. Like this:
SearchParameters sp = new SearchParameters();
sp.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
sp.setQuery("TYPE:\"mymodel:myfoldertype\" AND #cm\\:name:*one*"
I run this query in the authentication context of a user with AuthenticationUtil.runas(). The user has read-access to this folder.
Now, the resultset contains 0 results.
But if I copy/paste the query from the log into the Nodebrowser (in Lucene mode), it DOES return the expected folder.
What could cause this difference? Obviously I would like to get the expected folder in the resultset in my webscript as well.
In Java you're not escaping the \ properly
So #cm\:name:*one* should be #cm\\:name:*one*
The cause was that my webscript was running under the (JVM default) locale of en-US, but the Nodebrowser was running under the UI locale nl-NL. The cm:name property is of datatype d:text, which has different analyzers for en (AlfrescoStandardAnalyzer) and nl (DutchAnalyzer).
I changed the webscript to use the nl locale and now it returns the same results as the Nodebrowser:
import org.springframework.extensions.surf.util.I18NUtil;
...
I18NUtil.setLocale(new Locale("nl"));
return searchService.query(sp);