Search engine in Lucee

383 views
Skip to first unread message

Pierre Larde

unread,
May 30, 2016, 5:38:02 PM5/30/16
to Lucee
I am looking for search engine set up on Lucee.
What is needed to create a collection in Lucee admin ? how to do it.
And what is needed to get a search engine working. (    Lucene (v2.4 IIRC).  is that supplied with Lucee ?  )

Migrating from Coldfusion (with Verity) , I need an equivalent working with same CFML coding.

This functionnality is a must for migration.

Thanks for any help or information.
Pierre.

Denard Springle

unread,
May 31, 2016, 12:31:41 PM5/31/16
to Lucee
Hey Pierre,

   You can create collections in the admin under Settings -> Search on the left hand menu. From there you enter the name of the collection, it's path on the server and select a language for the search. You could also create them programatically using cfcollection (http://cfdocs.org/cfcollection) if you prefer (which is typically what I do for app portability).

   From there, all other search function work pretty much the same as they do in ACF (e.g. http://cfdocs.org/cfsearch, http://docs.lucee.org/reference/tags/search.html). 

   Let us know if you have any more questions!

-- Denny

Pierre Larde

unread,
May 31, 2016, 1:05:36 PM5/31/16
to Lucee
Thanks for answer.
I do not have the : Search on the left hand menu
Search option is not present.

Is there something to do at Lucee install ? or Lucee version ? (I have the last V4)

And is the Lucene search engine installed by default ?

Pierre.

Mark Drew

unread,
May 31, 2016, 1:09:04 PM5/31/16
to lucee
Are you looking in the server or web administrator? Search is per context, therefore in your web admin. 

Regards

Mark Drew


-- 
Win a ticket to dev.objective from Lucee via Twitter, see http://bit.ly/1UbTMWj for details, good luck and see you there...
--- 
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/b5f231bf-a027-430a-81f8-e1db839721a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pierre Larde

unread,
May 31, 2016, 3:50:24 PM5/31/16
to Lucee
OK, good.
effectivly , i did not look in the web admin. I got it now.
I do not understand well the web context versus the server context.
Is the web context linked for each created site ?
Thanks, I will practice this.
Pierre.

Igal @ Lucee.org

unread,
May 31, 2016, 3:55:39 PM5/31/16
to lu...@googlegroups.com

A Web-Context is created by the Servlet Container (e.g. Tomcat) for each Host Context that is defined in Tomcat/conf/server.xml, so you can think of it as a "each created site", but technically speaking a Web Context could host multiple sites so if you want to defined it accurately then it's not per-site per-se.

Igal Sapir
Lucee Core Developer
Lucee.org

Pierre Larde

unread,
Jun 1, 2016, 5:05:02 PM6/1/16
to Lucee
I have created a collection in WEB context, it has been created with same name : geophiles_site
Any idea in the stacktrace ? it says it is undefined, but it is, I can search in the admin panel.
(done on an online server)
Thanks for any idea ?
(I did the same collection on local environment, local Lucee, and it does work)

Collection geophiles_site

Namegeophiles_site
Mappedfalse
Onlinetrue
Externalfalse
Languagefrench
Last update2016-06-01 22:43
PathD:\luceePie\collections

And I get this error when trying a purge :

Messagecollection geophiles_site is undefined
Causelucee.runtime.search.SearchException
StacktraceThe Error Occurred in
D:\SitesPlarts\C010\www\task\site_col_index_auto.cfm: line 25
23:
24: <p> Starting Purge ....<p>
25: <cfindex action="PURGE" collection="#get_param.collection#_site">
26:
27: <p> Starting DataBase indexing ....<p>
collection geophiles_site is undefined
  at lucee.runtime.search.SearchEngineSupport.getCollectionByName(SearchEngineSupport.java:98):98
  at lucee.runtime.tag.Index.setCollection(Index.java:308):308
  at task.site_col_index_auto_cfm$cf.call(D:\SitesPlarts\C010\www\task\site_col_index_auto.cfm:25):25
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:951):951
  at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:56):56
  at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:36):36
  at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2262):2262
  at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2225):2225
  at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:456):456
  at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:47):47
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:729):729
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291):291
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52):52
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239):239
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217):217
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106):106
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502):502
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142):142
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79):79
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88):88
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518):518
  at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:844):844
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673):673
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500):1500
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456):1456
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142):1142
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617):617
  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61):61
  at java.lang.Thread.run(Thread.java:745):745



Le mardi 31 mai 2016 19:09:04 UTC+2, Mark Drew a écrit :

Pierre Larde

unread,
Jun 2, 2016, 6:32:31 AM6/2/16
to Lucee
I have deleted the collection.
And create a new one with an other name.
I changed the CFM to call the new collection name,
and I have the same error : "collection undefined".
Wondering, if it is not a directory name problem ?

Collections are created in : D:\luceePie\collections  (I created this directory)

Lucee has been installed Under "luceePie" directory  (not lucee)

Thanks for any help.
Pierre.

Error :
collection lesgeophiles_site is undefined
Causelucee.runtime.search.SearchException
StacktraceThe Error Occurred in
D:\SitesPlarts\C010\www\task\site_col_index_auto.cfm: line 25
23:
24: <p> Starting Purge ....<p>
25: <cfindex action="PURGE" collection="#get_param.collection#_site">

Pierre Larde

unread,
Jun 6, 2016, 8:06:51 AM6/6/16
to Lucee
Who could help me on that problem ?
On local environment, the collection is found.
On Internet environment, the collection is undefined.

The différences between the 2 environments are :
- The lucee directory name : "lucee" on local, "luceePie" on internet
- OS is Windows 7 on local and Windows server 2008 on internet

Any collection created on local works.
Any collection created on Internet (online) does not work (error : undefined)

It seems the collection is not found by the CFML programs,
in the Lucee admin panel (search) , I can search, it does work, returns "No Result for your criteria" (normal, as it has never been populated)

Thanks for any help, suggestion, (I do not see where to look, or what to do).
Pierre.

Mark Drew

unread,
Jun 6, 2016, 8:35:28 AM6/6/16
to lucee
I think you have different contexts happening so if you create the search collection in the lucee admin it is somehow referencing a different context than your live site. 

Are you creating the collection in the right admin?

For example if your domain is http://lucee.org then your code would be:

http://lucee.org/search.cfm  (where you call your <cfsearch>

and you would setup the collection in the admin:

Regards

Mark Drew



-- 
Win a ticket to dev.objective from Lucee via Twitter, see http://bit.ly/1UbTMWj for details, good luck and see you there...
--- 
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Mark Drew

unread,
Jun 6, 2016, 8:49:15 AM6/6/16
to lucee
To double check this, put this in your code:

dump(getPageContext().getConfig().label);

And compare that to what it says in the summary page in the lucee web admin if you click on the Lucee logo. 

Regards

Mark Drew


On 6 Jun 2016, at 13:06, Pierre Larde <pie...@pl-arts.com> wrote:

Pierre Larde

unread,
Jun 6, 2016, 10:32:49 AM6/6/16
to Lucee
Excellent, Thanks very much,
I think I do not understand well the "web context".
I did like you said, and it works.
Then to acces the web context, I must use this adress : (from the domain name)

If I use : http://127.0.0.1:8888/lucee/admin/web.cfm (on the server)
It is not attached to any site ?

The code   dump(getPageContext().getConfig().label);
gives :
string

   5ed5aa62b153eb5ed0c8d09aa1aa6e22

(no meaning for me)

So any Lucee admin is accessible from an external browser.

Thanks a lot, question is solved.
Pierre.



Le lundi 6 juin 2016 14:35:28 UTC+2, Mark Drew a écrit :
I think you have different contexts happening so if you create the search collection in the lucee admin it is somehow referencing a different context than your live site. 

Are you creating the collection in the right admin?

For example if your domain is http://lucee.org then your code would be:

http://lucee.org/search.cfm  (where you call your <cfsearch>

and you would setup the collection in the admin:

Pierre Larde

unread,
Jun 6, 2016, 10:41:46 AM6/6/16
to Lucee
OK, I understand the dump giving the string : 5ed5aa62b153eb5ed0c8d09aa1aa6e22
This is the general info label of the site web context.

Thanks a lot, great.
Pierre.

Mark Drew

unread,
Jun 6, 2016, 10:44:12 AM6/6/16
to lucee
Awesome! :) 

Glad it helped! 

There should be a page somewhere that describes contexts, as it is a common problem 

MD 

Reply all
Reply to author
Forward
0 new messages