Ahhh!

That got rid of the error although I don't find anything :D
At least I get a http 207 status, which I think means OK but nothing found?


I think now that all I have left on the Slide side of my search module is getting the SimpleXMLExtractor to work for this kind of XML.
<article>
<headline>Header</headline>
<teaser>Teaser</teaser>
<body>Body</body>
<author>Author</author>
<source/>
<comment>Comment</comment>
</article>


I have never tried XPath instruction so I guessed this setup in Domain.xml, is it correct (doesn't seem to work)?
<extractor classname="org.apache.slide.extractor.SimpleXmlExtractor" uri="/files/public/xml/">
<configuration>
<instruction property="headline" xpath="/article/headline/text()" />
<instruction property="teaser" xpath="/article/teaser/text()" />
<instruction property="body" xpath="/article/body/text()" />
<instruction property="author" xpath="/article/author/text()" />
<instruction property="source" xpath="/article/source/text()" />
<instruction property="comment" xpath="/article/comment/text()" />
</configuration>
</extractor>



And thank you very much for your support Stefan your a life saver!

-Eirikur, idega.



On 11.1.2005, at 10:44, Stefan L�tzkendorf wrote:

An onther thing I have found in your Domain.xml.

You have missed the <configuration name="indexed-properties"> element

<propertiesindexer_classname="org.apache.slide.index.lucene.LucenePrope rtiesIndexer">
<parameter name="indexpath">store/index/metadata</parameter>
<configuration name="indexed-properties">
<property name="author" namespace="http://xmlns.idega.com/com.idega.slide";>
<text/>
</property>
...
</configuration>
</propertiesindexer>


Stefan


Eirikur Hrafnsson wrote:

sorry I already matched those two.
The same query using a content "where" requirement works and does not complain about the namespaces but if you uncomment the property search it fails on the slide namespace (doesn't reach my namespace).

public class SearchTest {
public static void main(String[] args) throws HttpException, IOException {
String path = "/content";
String query = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <D:searchrequest xmlns:D =\"DAV:\" xmlns:I=\"http://xmlns.idega.com/com.idega.slide\"; xmlns:S=\"http://jakarta.apache.org/slide/\";>" +
http://jakarta.apache.org/slide/
"<D:basicsearch>" +
"<D:select>" +
"<D:prop>" +
"<D:getcontentlength/>" +
"</D:prop>" +
"</D:select>" +
"<D:from>" +
"<D:scope>" +
"<D:href>files</D:href>" +
"<D:depth>infinity</D:depth>" +
"</D:scope>" +
"</D:from>" +
"<D:where>" +
"<D:contains>Article</D:contains>" +
"</D:where>" +
// "<D:where>" +
// "<S:property-contains>" +
// "<D:prop><I:author/></D:prop>" +
// "<D:literal>Laufey</D:literal>" +
// "</S:property-contains>" +
// "</D:where>" +
"</D:basicsearch>" +
"</D:searchrequest>";
System.out.println(query);
SearchMethod method = new SearchMethod(path, query);
HttpURL httpURL = new HttpURL("localhost",8090,path);
HttpClient client = new HttpClient();
client.setState(new WebdavState());
HostConfiguration hostConfig = client.getHostConfiguration();
hostConfig.setHost(httpURL);
Credentials hostCredentials = new UsernamePasswordCredentials("Administrator","idega");
if (hostCredentials != null) {
HttpState clientState = client.getState();
clientState.setCredentials(null, httpURL.getHost(),
hostCredentials);
clientState.setAuthenticationPreemptive(true);
}
int state = client.executeMethod(method);
System.out.println("State: " + state);
Header[] headers = method.getResponseHeaders();
for (int i = 0; i < headers.length; i++) {
System.out.println(headers[i].toString());
}
Enumeration enum = method.getAllResponseURLs();
while (enum.hasMoreElements()) {
System.out.println(enum.nextElement());
}
}
}
On 11.1.2005, at 10:09, Stefan L�tzkendorf wrote:
One thin I saw is
in your query you define the namespace xmlns:u=\"http://www.idega.com/\";


And in die domain you are using http://xmlns.idega.com/com.idega.slide.
You shouold use ths same ab both places.


Stefan

Eirikur Hrafnsson wrote:

Sure, here it is, I just removed a some commented out stuff
-Eirikur, Idega
On 11.1.2005, at 09:15, Stefan L�tzkendorf wrote:

Sorry I wand to write "I have NO idea currently." :-(
Can you send me your Domain.xml file?
Stefan

Stefan L�tzkendorf wrote:

I have idea currently.
Can you send me your Domain.xml file.
Stefan
Eirikur Hrafnsson wrote:


On 10.1.2005, at 18:34, Stefan L�tzkendorf wrote:

Do you have your <u:Author/> property declared to be a text-property in out domain.xml.
e.g. <property name="Author" namespace="your namespace here">
<text/>
</property>


see my favorite page http://wiki.apache.org/jakarta-slide/DaslConfiguration for details :-).

Stefan




I didn't but I have now but I still get the error
10 Jan 2005 18:53:38 - org.apache.slide.common.Domain - WARNING - operator <http://jakarta.apache.org/slide/:property-contains> is an unprocessable entity
http8090-Processor23, 10-Jan-2005 18:51:18, Administrator, SEARCH, 422 "Unprocessable Entity", 140677 ms, /


So it never even gets to my namespace...

-Eirikur, idega.



Eirikur Hrafnsson wrote:

On 10.1.2005, at 17:31, Stefan L�tzkendorf wrote:

The namespace S is not defined.
Add xmlns:S=xmlns:S="http://jakarta.apache.org/slide/"; to your searchrequest element.




Ok, saw that right after I posted the mail and changed my xml to
"<D:searchrequest xmlns:D =\"DAV:\" xmlns:S=\"http://jakarta.apache.org/slide/\"; xmlns:u=\"http://www.idega.com/\"; >" +
"<D:basicsearch>" +
...
And now I get the error
10 Jan 2005 17:58:48 - org.apache.slide.common.Domain - WARNING - operator <http://jakarta.apache.org/slide/:property-contains> is an unprocessable entity
http8090-Processor22, 10-Jan-2005 17:58:11, Administrator, SEARCH, 422 "Unprocessable Entity", 44997 ms, /
what now...
-Eirikur, idega.



Stefan

Eirikur Hrafnsson wrote:

Any idea why this DASL property search fails? A content search works with the same "path" and "scope" :D
String path = "/content";
String query =
"<D:searchrequest xmlns:D =\"DAV:\">" +
"<D:basicsearch>" +
"<D:select>" +
"<D:prop>" +
"<D:getcontentlength/>" +
"</D:prop>" +
"</D:select>" +
"<D:from>" +
"<D:scope>" +
"<D:href>files</D:href>" +
"<D:depth>infinity</D:depth>" +
"</D:scope>" +
"</D:from>" +
"<D:where>" + "<S:property-contains>" +
"<D:prop><u:Author/></D:prop>" +
"<D:literal>Laufey</D:literal>" +
"</S:property-contains>" +
"</D:where>" +
"</D:basicsearch>" +
"</D:searchrequest>";
SearchMethod method = new SearchMethod(path, query);
The servlet gives the error:
http8090-Processor18, 10-Jan-2005 16:58:15, Administrator, SEARCH, 207 "Multi-Status", 2340 ms, /
http8090-Processor14, 10-Jan-2005 16:59:11, Administrator, SEARCH, 400 "Bad Request", 35 ms, /
Cheers
Eirikur, Idega.






--  Stefan L�tzkendorf  --  [EMAIL PROTECTED]


-------------------------------------------------------------- -- -- ---
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Best Regards
Eirikur S. Hrafnsson, [EMAIL PROTECTED]
Chief Software Engineer
Idega Software
http://www.idega.com





-- Stefan L�tzkendorf -- [EMAIL PROTECTED]


---------------------------------------------------------------- -- -- -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Best Regards

Eirikur S. Hrafnsson, [EMAIL PROTECTED]
Chief Software Engineer
Idega Software
http://www.idega.com


-- Stefan L�tzkendorf -- [EMAIL PROTECTED]


------------------------------------------------------------------- --
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Best Regards
Eirikur S. Hrafnsson, [EMAIL PROTECTED]
Chief Software Engineer
Idega Software
http://www.idega.c
om


--
Stefan L�tzkendorf  --  [EMAIL PROTECTED]



Best Regards
Eirikur S. Hrafnsson, [EMAIL PROTECTED]
Chief Software Engineer
Idega Software
http://www.idega.com

-- Stefan L�tzkendorf -- [EMAIL PROTECTED]



Best Regards

Eirikur S. Hrafnsson, [EMAIL PROTECTED]
Chief Software Engineer
Idega Software
http://www.idega.com

Reply via email to