Search API filtering - specifying an exact match

View: New views
3 Messages — Rating Filter:   Alert me  

Search API filtering - specifying an exact match

by richtebb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The current behaviour of the search API appears to be to perform an implicit wildcard search, so that (for example)

..../data_index/....&v=1

searches for 1* and will therefore match v=1, v=1.0, v=10 etc.

Is there any way to request an exact match, so that a search for v=1 doesn't end up returning a "too many results" code?

Re: Search API filtering - specifying an exact match

by Tamás Cservenák :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yeah, kinda ugly (regexp-kind) but that's what we have right now:


(there is "1.2.13.v200706111418" returned also)

vs


(only versions "1.2.13")


This delimiter works for all fields...


Thanks,
~t~

On Tue, Oct 20, 2009 at 4:00 PM, richtebb <ext-rich.tebb@...> wrote:

The current behaviour of the search API appears to be to perform an implicit
wildcard search, so that (for example)

..../data_index/....&v=1

searches for 1* and will therefore match v=1, v=1.0, v=10 etc.

Is there any way to request an exact match, so that a search for v=1 doesn't
end up returning a "too many results" code?
--
View this message in context: http://www.nabble.com/Search-API-filtering---specifying-an-exact-match-tp25975615p25975615.html
Sent from the Nexus Maven Repository Manager Users List mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-user-unsubscribe@...
For additional commands, e-mail: nexus-user-help@...



Re: Search API filtering - specifying an exact match

by richtebb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the info Tamás. I had just tried that as an experiment when I got your message! Works perfectly and solves my problems, many thanks

Rich

Tamás Cservenák wrote:
Yeah, kinda ugly (regexp-kind) but that's what we have right now:
http://repository.sonatype.org/service/local/data_index?a=log4j&v=1.2.13

(there is "1.2.13.v200706111418" returned also)

vs

http://repository.sonatype.org/service/local/data_index?a=log4j&v=^1.2.13$

(only versions "1.2.13")


This delimiter works for all fields...


Thanks,
~t~

On Tue, Oct 20, 2009 at 4:00 PM, richtebb <ext-rich.tebb@nokia.com> wrote: