위치:
Solr 쿼리 편집 및 테스트
Atom XSL 파일을 참조하는 매개 변수를 Solr 쿼리에 추가합니다. 그런 다음 변경 사항을 테스트하여 해당 결과가 XML Atom 형식으로 표시되는지 확인합니다.
-
Solr 쿼리에
wt=xslt및tr=file_name.xsl매개변수(여기에서 file_name은 Atom XSL 파일의 이름)를 추가합니다. 예를 들면tr=acme.xsl와 같습니다. - http://localhost:8983/solr/techproducts/select?q=sd500&wt=xslt&tr=example_atom.xsl을 사용하여 쿼리를 테스트합니다. 이 테스트에서 핵심 이름은 techproducts이고 검색 용어는 sd500입니다.
다음은 Atom XML로 서식이 지정된 응답의 예입니다.
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Solr Atom 1.0 Feed</title>
<subtitle>
This has been formatted by the sample "example_atom.xsl" transform - use your own XSLT to get a nicer Atom feed.
</subtitle>
<author>
<name>Apache Solr</name>
<email>solr-user@lucene.apache.org</email>
</author>
<link rel="self" type="application/atom+xml" href="http://localhost:8983/solr/q=sd500&wt=xslt&tr=atom.xsl"/>
<updated/>
<id>tag:localhost,2007:example</id>
<entry>
<title>Canon PowerShot SD500</title>
<link href="http://localhost:8983/solr/select?q=9885A004"/>
<id>tag:localhost,2007:9885A004</id>
<summary>
3x zoop, 7.1 megapixel Digital ELPHmovie clips up to 640x480 @30 fps2.0" TFT LCD, 118,000 pixelsbuilt in flash, red-eye reduction
</summary>
<updated/>
</entry>
</feed>

