Hexagon Geospatial
MENU

GeoMedia Smart Client

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 18
Registered: ‎10-19-2015
Accepted Solution

FullTextIndex on Oracle

Hi

 

Did anybody implement a public maps search using an oracle data source? There is a manual in the wiki how to create full text index in oracle, but we don't succeed. Does anybody have a sample script? Should it also work with oracle express?

 

Thanks & regards

Carmen

Staff
Posts: 1,036
Registered: ‎10-18-2015

Re: FullTextIndex on Oracle

Hi Carmen,

 

here is an example.

 

--Creation of preference for custom LEXER
BEGIN
  ctx_ddl.create_preference(
    preference_name => 'MCNO_LEXER',
    object_name     => 'BASIC_LEXER'
  );
  -- turn off MIXED_CASE
  ctx_ddl.set_attribute(
    preference_name => 'MCNO_LEXER',
    attribute_name  => 'MIXED_CASE',
    attribute_value => 'NO'
  );
END;
-- create preference with list of columns to search on
BEGIN
ctx_ddl.drop_preference ('HOTELXXPREF');
ctx_ddl.create_preference('HOTELXXPREF', 'MULTI_COLUMN_DATASTORE');
ctx_ddl.set_attribute('HOTELXXPREF', 'COLUMNS', 'FAC_NAME,FAC_ADD,NAME');
END;
-- this is a dummy column to be used in the index creation
alter table HOTEL_X_X add SearchColumn varchar2(1);
--Creation of text index with sync parameter
drop index HOTEL_X_X_FTIDX force;
CREATE INDEX HOTEL_X_X_FTIDX
ON HOTEL_X_X(SearchColumn)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS ('DATASTORE HOTELXXPREF SYNC (ON COMMIT) LEXER MCNO_LEXER');

HTH,

ciao.

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Occasional Contributor
Posts: 18
Registered: ‎10-19-2015

Re: FullTextIndex on Oracle

Grazie mille Smiley Very Happy

 

Regards

Carmen

Staff
Posts: 1,036
Registered: ‎10-18-2015

Re: FullTextIndex on Oracle

Non c'è di che! Smiley Happy

 

ciao,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Contributor
Posts: 20
Registered: ‎10-09-2017

Re: FullTextIndex on Oracle

Hi Stefano, 

 

I'm also trying to implement the Full-Text Index searching using Oracle but no results are being displayed in Public Map as shown in the figure below. It just continues loading.

 

PublicMap.jpg

 

The SQL statement that I've run for my Full-Text search in oracle are as follow:

--Creation of preference for custom LEXER
BEGIN
  ctx_ddl.create_preference(
    preference_name => 'MCNO_LEXER',
    object_name     => 'BASIC_LEXER'
  );
  -- turn off MIXED_CASE
  ctx_ddl.set_attribute(
    preference_name => 'MCNO_LEXER',
    attribute_name  => 'MIXED_CASE',
    attribute_value => 'NO'
  );
END;

-- create preference with list of columns to search on
BEGIN
ctx_ddl.create_preference('OSMROADPREF', 'MULTI_COLUMN_DATASTORE');
ctx_ddl.set_attribute('OSMROADPREF', 'COLUMNS', 'FCLASS,NAME');
END;
-- this is a dummy column to be used in the index creation
alter table GBM.T_OSM_ROAD_L add SearchColumn varchar2(1);
--Creation of text index with sync parameter
CREATE INDEX T_OSM_ROAD_FTIDX
ON GBM.T_OSM_ROAD_L(SearchColumn)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS ('DATASTORE OSMROADPREF SYNC (ON COMMIT) LEXER MCNO_LEXER');

Since no error popping up hence I don't know what's the problem with the searching. Can you please advice on this matter?

 

Thank you.

Staff
Posts: 1,036
Registered: ‎10-18-2015

Re: FullTextIndex on Oracle

hi Jasmine,

 

please check the browser console and log files on the server side for additional information.

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Highlighted
Contributor
Posts: 20
Registered: ‎10-09-2017

Re: FullTextIndex on Oracle

I've checked the log files along with the browser console:

 

From the Log Files - 

04.07.2019 16:09:04 ERROR - http://gis02.jpphvis.com/GMSC/Public/Search?mapViewId=6f8caf18-02c1-4e93-86a0-eda39adacee1&site=GMSC
System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
   [Data]
   MS_LoggedBy: System.Collections.Generic.List`1[System.Object]
   at System.Data.SqlTypes.SqlInt32.get_Value()
   at Intergraph.Emea.GeoSpatial.Geometry..ctor(SqlGeometry geometry, Int32 dimension, Int32 srid)
   at Intergraph.Emea.GeoSpatial.Geometry.STCentroid()
   at Intergraph.Emea.SmartClient.PublicMaps.SearchAggregator.Search(SearchMetadata searchMetadata, String searchTerm)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()

It stated that the data is null but I could query and obtained results from Oracle as shown in the figure below:

 

Road_db.jpg

 

The output from browser console stated that its an Internal server error:

Browser console.jpg

 

I don't really understand where it went wrong?

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.