This works for me
Simple
search.xml?query=(carbon)
Simple scoped
search.xml?query=(abstract:carbon)
Advanced
search.xml?query=((abstract:carbon)%20AND%20(author:smith))&collection=49&idOnly=false&sort=id&_limit=2000&_perpage=2000
sort doesn't seem to work, so I sort after I get back results. I am accessing
our REST instance via PHP code
The response you got back below is the "I hear you but search term not found"
response
On Mar 20, 2012, at 1:06 PM, Milne, Mary wrote:
> Thanks mark for your response – we have discovery enabled so will the lucene
> searches work and are the collection or community param required? Should I
> create an instance that has SearchArtifact etc re-enabled?
>
> For instance
>
> /dspace-rest-1.8.1/search?query=flood
> /dspace-rest-1.8.1/search?query={flood}
> /dspace-rest-1.8.1/search?query=flood&collection=3
>
> The only thing that gets any kind of response is :
> /dspace-rest-1.8.1/search.xml?query={flood}
>
> <search_collection entityPrefix="search">
> <search type="bean" size="9">
> <id type="number">0</id>
> <name/>
> <resultHandles type="collection" size="0"></resultHandles>
> <resultIDs type="collection" size="0"></resultIDs>
> <resultTypes type="collection" size="0"></resultTypes>
> <resultsCount type="number">-1</resultsCount>
> <entityReference>/search/0</entityReference>
> <entityURL>http://localhost:8080/dspace-rest-1.8.1/search/0</entityURL>
> <entityId>0</entityId>
> </search>
> </search_collection>
>
> Although I’ve got it running on 8090 but this may be hardwired somewhere and
> a red herring.
>
> Thanks in advance for any light shed.
>
> Mary
> From: [email protected] [mailto:[email protected]] On Behalf Of Mark Diggory
> Sent: 17 March 2012 00:37
> To: Milne, Mary
> Cc: [email protected]
> Subject: Re: [Dspace-tech] REST query Syntax
>
> It's more than likely going to be lucene syntax for the moment in the query
> field. This going to either be free text, Boolean operators or fielded
> searches like title:foo AND author:bar
>
> This is old legacy search, not discovery, you'd get actuall metadata field
> search and facetting out of discovery if we ever create an API for it, which
> has come up a couple times in dialog.
>
> query=query&community=id or collection=I'd
>
> Best,
> Mark
>
> On Friday, March 16, 2012, Milne, Mary <[email protected]> wrote:
>> Hello
>>
>>
>>
>> I am working on a project using the REST API to enable some search
>> interoperability with Drupal. I’ve had no problems installing and setting up
>> the webapp and issuing requests such as:
>>
>>
>>
>> /dspace-rest-1.8.1/collections.xml
>>
>> /dspace-rest-1.8.1/items/60.xml
>>
>>
>>
>> However what I need is to run the search query and I don’t know whether I
>> can’t crack the syntax or whether my expectation that I should see something
>> in the browser is misplaced or if I’m somehow not referencing the field
>> names correctly. If I run the above with the .xml I see nothing but adding
>> .xml to any of my attempts seems to do nothing either. I have tried every
>> combination of brackets, slashes, ? and & but none have worked although only
>> a few seem to have actively failed. So could someone please put me out of my
>> misery and how me how to do a search something like:
>>
>>
>>
>> dc.title = flood and water
>>
>> text = climate
>>
>>
>>
>>
>>
>> Many Thanks
>>
>> Mary
>>
>>
>>
>>
>>
>>
>>
>> Mary Milne BSc
>>
>> Solutions Architect
>>
>> British Library
>>
>>
>
> --
>
> Mark Diggory (Schedule a Meeting)
> 2888 Loker Avenue East, Suite 305, Carlsbad, CA. 92010
> Esperantolaan 4, Heverlee 3001, Belgium
> http://www.atmire.com
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure_______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
-----------------------------------------------------------------------
| Wesley Alan Wright <mailto:[email protected]> |
| Center for Teaching and Learning __0__ |
| Room 407 Lafayette Building / \ | \ |
| University of Vermont \77 |
| Burlington, Vermont 05405-0160 USA. \\ http://www.uvm.edu/skivt-l |
| Voice: 802-656-1254 vv |
| aim:goim?screenname=maddogskideath http://www.uvm.edu/~waw/ |
-----------------------------------------------------------------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech