Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] /filesearch not immediately successful

Try setting this header on your XHR call. It should force the Orion server to return a JSON response:
 
Orion-Version: 1

See the note in the API docs: https://wiki.eclipse.org/Orion/Server_API#Version_header

I don't know why the Orion server does not use the Accept header for this purpose. I've opened a bug to investigate it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=433780

Mark


On Tue, Apr 29, 2014 at 10:37 AM, Siefken, Hergen <hergen.siefken@xxxxxxx> wrote:

Hello Mark,

 

I executed the following command:

 

http://localhost:8082/search/search.html#/file/hsn-OrionContent/nw.epm.refapps.shop/,regEx=true,fileType=xml

 

which led to a lot of

 

/file/hsn-OrionContent/nw.epm.refapps.shop /.../?depth=1”

 

calls. One call returned the pom.xml that I am exactly searching for:

 

 

As you can see, the response is in JSON.

 

However, when I run the command

 

http://localhost:8082/file/hsn-OrionContent/nw.epm.refapps.shop/?depth=1

 

with jQuery.ajax() or in a REST client, I always get a response in HTML (and less information compared to the JSON response above):

 

 

I am not very familiar with HTTP headers, but I set “Accept” to “application/json” in the REST client

and dataType : "json" in the jQuery.ajax(), but with no effect.

 

Do have any idea how to get the response in JSON?

 

Best regards

  Hergen

 

From: orion-dev-bounces@xxxxxxxxxxx [mailto:orion-dev-bounces@xxxxxxxxxxx] On Behalf Of Mark Macdonald
Sent: Freitag, 25. April 2014 18:10
To: Orion developer discussions


Subject: Re: [orion-dev] /filesearch not immediately successful

 

Hi Hergen,

 

I use the following call to do this:

/filesearch?q=NameLower:pom.xml+Location:/file/user-OrionContent/folder/* 

Can I use the “Regular _expression_” in this call “to force a crawling search”?


As Libing said, the regular _expression_ ("crawling") search is performed by the client, not the server, so it has no explicit server call. However-- you can craft a URL leading to a search page that does (almost) what you want. It would look something like this:

https://your-orion-server/search/search.html#/file/hergen-OrionContent/your/working/directory/,regEx=true,fileType=xml

 

When you visit this URL in your browser, and click Search, it should find all xml files in the working directory, including pom.xml. Since the crawler currently does not provide a way to filter against a filename, this is the best you can achieve right now.

As Ken said, there's many improvements in the search functionality that we'd like to see…


Regards,
Mark

 

On Fri, Apr 25, 2014 at 10:14 AM, Siefken, Hergen <hergen.siefken@xxxxxxx> wrote:

Dear Ken,

 

your screenshot shows a functionality with which I can search for a specific term in a files content, right?

 

I search for a specific file name („pom.xml“).

I use the following call to do this:

/filesearch?q=NameLower:pom.xml+Location:/file/user-OrionContent/folder/*

 

Can I use the “Regular _expression_” in this call “to force a crawling search”?

If so, how can I do this?

 

Best regards

  Hergen

 

From: orion-dev-bounces@xxxxxxxxxxx [mailto:orion-dev-bounces@xxxxxxxxxxx] On Behalf Of Ken Walker
Sent: Freitag, 25. April 2014 15:46
To: Orion developer discussions
Cc: orion-dev-bounces@xxxxxxxxxxx
Subject: Re: [orion-dev] /filesearch not immediately successful

 

One workaround to this (yes the indexer can be slow to update changes) is to toggle the "Regular _expression_" option to force a crawling search vs. using the index.

We're not happy with the current indexing scheme and are thinking about alternatives.



Ken Walker
Lead of the Orion Project at Eclipse and within IBM | Tools for the Web, On the Web
https://orionhub.org | http://wiki.eclipse.org/Orion | https://hub.jazz.net
@kwalker | @orionhub | @jazzhub



Inactive hide details for "Siefken, Hergen" ---2014/04/25 09:39:47 AM---Dear orion developers, after cloning or fetching I imme"Siefken, Hergen" ---2014/04/25 09:39:47 AM---Dear orion developers, after cloning or fetching I immediately search for a specific file in the git

From:


"Siefken, Hergen" <hergen.siefken@xxxxxxx>

To:


"orion-dev@xxxxxxxxxxx" <orion-dev@xxxxxxxxxxx>

Date:


2014/04/25 09:39 AM

Subject:


[orion-dev] /filesearch not immediately successful

Sent by:


orion-dev-bounces@xxxxxxxxxxx





Dear orion developers,
 
after cloning or fetching I immediately search for a specific file in the git working directory.
I do it with the /filesearch API.
Unfortunately it takes too long until /filesearch finds the file.
 
I have heard there is an indexer involved. Can this indexer be configured?
 
The long searching time is really harmful.
 
The Orion build is 5.0, build date 26 Feb 2014.
 
Regards
  Hergen Siefken
 _______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev


_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev

 


_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev



Back to the top