ColdFusion 11 SOLR indexing logging conspicuous errors - solr

I am running a scheduled task to refresh my SOLR collection. The coldfusion-out.log file has quite a few of the following errors:
Jan 12, 2016 10:10:21 AM Warning [ajp-bio-8014-exec-5] - WARNING: Could not index D:\PDFs\9310.PDF in SOLR. Check the exception for more details: An error occurred during GETINFO operation in the cfpdf tag.
Jan 12, 2016 10:10:51 AM Warning [ajp-bio-8014-exec-5] - WARNING: Could not index D:\PDFs\9887.PDF in SOLR. Check the exception for more details: An error occurred during the EXTRACTTEXT operation in the cfpdf tag.
The task code to retrieve the file locations:
<cfsetting requesttimeout="3600" />
<cfquery name="getDocs" datasource="#APPLICATION.DataSource#">
SELECT DISTINCT
SKU,
STATUS,
'D:\PDFs\'
CONCAT TRIM(DOCID)
CONCAT '.PDF' AS document_file
FROM MYTABLE
</cfquery>
<cfindex
query="getDocs"
collection="prudocs3"
action="refresh"
type="file"
key="document_file"
custom1="SKU"
custom2="STATUS" />
Any idea what is causing this?

While googling more about this, I came across this post from the wise Raymond Camden:
http://www.raymondcamden.com/2014/07/11/Issue-with-CFINDEX/
Once I read this, I took a closer look at the PDFs being used, they indeed did not have the Extraction permission turned on. I have contacted the vendor about updating their PDFs, so that they can be properly indexed and included in search results.

Related

Mapserver/PostGIS FILTER Query Error

I am new using mapsever. I downloaded an example from Internet (http://www.codegeo.com.br/search/label/MapServer). I tested it in my PC, my development environment (mapserver version 6.4.1), and it works.
Now I put it in a "testing enviroment" (mapserver version 7.0.0), but I have a problem with the FILTER directive in the mapfile.
This is the code in the .map file:
DATA "the_geom FROM estados USING UNIQUE id USING SRID=4326"
FILTER "sigla ILIKE '%%state%%'"
When I execute the script, I get an empty png file but there is no errors:
$ mapserv -nh "QUERY_STRING=map=/var/www/codegeo/codegeo.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=states&estado=SP&WIDTH=256&HEIGHT=256&CRS=EPSG%3A900913&STYLES=&BBOX=0%2C0%2C2504688.5428486555%2C2504688.5428486555"
The log file defined into the mapfile file has the following error:
executing query: select "nome","codigo",encode(ST_AsBinary(ST_Force2D("the_geom"),'NDR'),'hex') as geom,"id" from estados where the_geom && ST_GeomFromText('POLYGON((0.0439453124999988 0.0439453081913454,0.0439453124999988 21.9022779666686,22.4560546875 21.9022779666686,22.4560546875 0.0439453081913454,0.0439453124999988 0.0439453081913454))',4326) and ()
[Mon Feb 27 11:39:06 2017].147993 msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs
[Mon Feb 27 12:05:49 2017].361015 getSymbol(): Symbol definition error. Parsing error near (():(line 123)
[Mon Feb 27 11:39:06 2017].147993 msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs
[Mon Feb 27 12:05:49 2017].361015 getSymbol(): Symbol definition error. Parsing error near (():(line 123)
I know that is something wrong with the filter instruction. If i comment it , I see the layer in the web page. I didn't find any documentation about ILIKE operator.
Somebody knows which is the problem?
From Mapserver 7, you cannot use "native filters" anymore.
Check the docs here
http://mapserver.org/de/mapfile/layer.html (under FILTER).
You need to rewrite the filter using the expression syntax documented here http://mapserver.org/de/mapfile/expressions.html#expressions

The Microsoft Access Database Engine does not recognize

I use Access at work, I'm mostly self-taught and I know very little code . I've built a data base for handling HR KPI´S. In some of my queries, since 2016 started (2015 still runs), several reports I run now pops the error:
"The Microsoft Access Database Engine does not recognize 'C_Hrs_Permiso_TI_NT.NOTRAB' as a valid field name or expression".
I'm not sure why the report would be giving me an error about it.
Query Code:
TRANSFORM Sum(Hrs_Permiso_TI_NT.MONTOO) AS SumaDeMONTOO
SELECT Hrs_Permiso_TI_NT.EMPRESA,
Hrs_Permiso_TI_NT.CENCOS,
Left([Hrs_Permiso_TI_NT]![AMES],4) AS Año,
Right([Hrs_Permiso_TI_NT]![AMES],2) AS Mes,
Hrs_Permiso_TI_NT.CODIGO,
Fecha_maxmes_Calendario.MáxDeFecha
FROM Hrs_Permiso_TI_NT INNER JOIN Fecha_maxmes_Calendario
ON Hrs_Permiso_TI_NT.AMES=Fecha_maxmes_Calendario.Ames
GROUP BY Hrs_Permiso_TI_NT.EMPRESA,
Hrs_Permiso_TI_NT.CENCOS,
Left([Hrs_Permiso_TI_NT]![AMES],4),
Right([Hrs_Permiso_TI_NT]![AMES],2),
Hrs_Permiso_TI_NT.CODIGO,
Fecha_maxmes_Calendario.MáxDeFecha
PIVOT Hrs_Permiso_TI_NT.COHADE;
As soon as this query doesn't contain C_Hrs_Permiso_TI_NT, it means that the problem is one of queries 'Hrs_Permiso_TI_NT' or Fecha_maxmes_Calendario. Try to open them and locate error

CFINDEX throwing attribute validation error exception

I am upgrading to ColdFusion 11 from ColdFusion 8, so I need to rebuild my search indices to work Solr instead of Verity. I cannot find any reliable way to import my old Verity collections, so I'm attempting to build the new indices from scratch. I am using the following code to index some items along with their corresponding documents which are located on the server:
<cfsetting requesttimeout="3600" />
<cfquery name="qDocuments" datasource="#APPLICATION.DataSource#">
SELECT DISTINCT
ID,
Status,
'C:\Documents\'
CONCAT ID
CONCAT '.PDF' AS File
FROM tblDocuments
</cfquery>
<cfindex
query="qDocuments"
collection="solrdocuments"
action="fullimport"
type="file"
key="document_file"
custom1="ID"
custom2="Status" />
A very similar setup was used with Verity for years without a problem.
When I run the above code, I get the following exception:
Attribute validation error for CFINDEX.
The value of the FULLIMPORT attribute is invalid.
Valid values are: UPDATE, DELETE, PURGE, REFRESH, FULL-IMPORT,
DELTA-IMPORT,STATUS, ABORT.
This makes absolutely no sense, since there is no "FULLIMPORT" attribute for CFINDEX.
I am running ColdFusion 11 Update 3 with Java 1.8.0_25 on Windows Server 2008R2/IIS7.5.
You should believe the error message. try this:
<cfindex
query="qDocuments"
collection="solrdocuments"
action="FULL-IMPORT"
type="file"
key="document_file"
custom1="ID"
custom2="Status" />
It's referring to the value of the attribute action.
This is definitely a bug. In the ColdFusion documentation, fullimport is not an attribute of cfindex.
I know this is an old thread, but in case anyone else has the same question, it's just poor descriptions in the documentation. The action "FullImport" is only available when using type="dih" (i.e. Data Import Handler). When using the query attributes, use action="refresh" instead.
Source: CFIndex Documentation:
...
When type="dih", these actions are used:
abort: Aborts an ongoing indexing task.
deltaimport: For partial indexing. For instance, for any updates in the database,
instead of a full import, you can perform delta import to update your
collection.
fullimport: To index full database. For instance,
when you index the database for the first time.
status:
Provides the status of indexing, such as the total number of documents
processed and status such as idle or running.

SOQL - Convert Date To Owner Locale

We use the DBAmp for integrating Salesforce.com with SQL Server (which basically adds a linked server), and are running queries against our SF data using OPENQUERY.
I'm trying to do some reporting against opportunities and want to return the created date of the opportunity in the opportunity owners local date time (i.e. the date time the user will see in salesforce).
Our dbamp configuration forces the dates to be UTC.
I stumbled across a date function (in the Salesforce documentation) that I thought might be some help, but I get an error when I try an use it so can't prove it, below is the example useage for the convertTimezone function:
SELECT HOUR_IN_DAY(convertTimezone(CreatedDate)), SUM(Amount)
FROM Opportunity
GROUP BY HOUR_IN_DAY(convertTimezone(CreatedDate))
Below is the error returned:
OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 13005 : Error translating SQL statement: line 1:37: expecting "from", found '('".
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE".
Can you not use SOQL functions in OPENQUERY as below?
SELECT
*
FROM
OPENQUERY(SALESFORCE,'
SELECT HOUR_IN_DAY(convertTimezone(CreatedDate)), SUM(Amount)
FROM Opportunity
GROUP BY HOUR_IN_DAY(convertTimezone(CreatedDate))')
UPDATE:
I've just had some correspondence with Bill Emerson (I believe he is the creator of the DBAmp Integration Tool):
You should be able to use SOQL functions so I am not sure why you are
getting the parsing failure. I'll setup a test case and report back.
I'll update the post again when I hear back. Thanks
A new version of DBAmp (2.14.4) has just been released that fixes the issue with using ConvertTimezone in openquery.
Version 2.14.4
Code modified for better memory utilization
Added support for API 24.0 (SPRING 12)
Fixed issue with embedded question marks in string literals
Fixed issue with using ConvertTimezone in openquery
Fixed issue with "Invalid Numeric" when using aggregate functions in openquery
I'm fairly sure that because DBAmp uses SQL and not SOQL, SOQL functions would not be available, sorry.
You would need to expose this data some other way. Perhaps it's possible with a Salesforce report, web-service, or compiling the data through the program you are using to access the (DBAmp) SQL Server.
If you were to create a Salesforce web service, the following example might be helpful.
global class MyWebService
{
webservice static AggregateResult MyWebServiceMethod()
{
AggregateResult ar = [
SELECT
HOUR_IN_DAY(convertTimezone(CreatedDate)) Hour,
SUM(Amount) Amount
FROM Opportunity
GROUP BY HOUR_IN_DAY(convertTimezone(CreatedDate))];
system.debug(ar);
return ar;
}
}

Solr Search : SEVERE: java.lang.ArrayIndexOutOfBoundsException: -1

I am getting the following error when I try a search query in my solr, am not sure what might be causing this, but this has bought a halt to all our work.
This query works:
http://10.0.0.13:8080/solr/cmn/select/?q=*:*&fl=searchText&rows=40000
But this:
http://10.0.0.13:8080/solr/cmn/select/?q=solr
doesn't work, and gives the following exception:
SEVERE: java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.packed.Packed64.get(Packed64.java:186)
at org.apache.lucene.index.TermInfosReaderIndex.seekEnum(TermInfosReaderIndex.java:118)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:235)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:172)
at org.apache.lucene.index.SegmentReader.docFreq(SegmentReader.java:509)
at org.apache.solr.search.SolrIndexReader.docFreq(SolrIndexReader.java:309)
at org.apache.lucene.search.TermQuery$TermWeight$1.add(TermQuery.java:56)
at org.apache.lucene.util.ReaderUtil$Gather.run(ReaderUtil.java:77)
at org.apache.lucene.util.ReaderUtil$Gather.run(ReaderUtil.java:82)
at org.apache.lucene.util.ReaderUtil$Gather.run(ReaderUtil.java:66)
at org.apache.lucene.search.TermQuery$TermWeight.<init>(TermQuery.java:53)
at org.apache.lucene.search.TermQuery.createWeight(TermQuery.java:199)
at org.apache.lucene.search.Searcher.createNormalizedWeight(Searcher.java:168)
at org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:664)
Regards,
Rohit
The index had crashed due to improper shutdown of tomcat, though the error doesn't reflect the same, fixed the index using the following command,
java -cp ./example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-core-3.1.0.jar -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex "D:\Brandmanagement\solr\example\simplify360\crss\data\index" -fix
It would have been helpful if solr would have thrown the exact exception of the Index crashing. The index crashing issue has been fixed in solr 3.4 onward i guess.

Resources