Discussion:
[mb-devel] Unified browse and search interface as GSoC 2015
Thanuditha Ruchiranga
2015-03-28 06:15:18 UTC
Permalink
Hi

I am trying to add some support for year agnostic entries like "artists
born between 1st of January and 1st of February" when browsing artists
under the born/founded sub category in the mockup
<http://musicbrainzexploremockup-ruchiranga.rhcloud.com/> I built. I looked
for a supported syntax for that and found no luck in finding any in the
links
https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2/Search
and
https://musicbrainz.org/doc/Search_Server.

Does the search server support that kind of queries? if so is there any
documentation i can refer to?
Ian McEwen
2015-03-28 06:51:55 UTC
Permalink
The search server has a variety of fields, documented at
http://musicbrainz.org/doc/Indexed_Search_Syntax and supports the
general lucene query parser syntax, documented at:

https://lucene.apache.org/core/4_0_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description

What you're asking for here is problematic because it involves an
initial wildcard on the date (which is not allowed), but you can do it
with a regular expression search, e.g.:

https://musicbrainz.org/search?query=begin%3A%2F.*%3F-01-.*%2F&type=artist&limit=25&method=advanced

... which is not exactly what you asked for, specifically that's artists
whose begin date's month is January, but I think that's what you meant
:)

I believe the search does not properly handle dates without years, as
well. But hopefully that answers your question relatively
satisfactorily.
Post by Thanuditha Ruchiranga
Hi
I am trying to add some support for year agnostic entries like "artists
born between 1st of January and 1st of February" when browsing artists
under the born/founded sub category in the mockup
<http://musicbrainzexploremockup-ruchiranga.rhcloud.com/> I built. I looked
for a supported syntax for that and found no luck in finding any in the
links
https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2/Search
and
https://musicbrainz.org/doc/Search_Server.
Does the search server support that kind of queries? if so is there any
documentation i can refer to?
_______________________________________________
MusicBrainz-devel mailing list
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel
Thanuditha Ruchiranga
2015-03-28 07:19:05 UTC
Permalink
Post by Ian McEwen
The search server has a variety of fields, documented at
http://musicbrainz.org/doc/Indexed_Search_Syntax and supports the
https://lucene.apache.org/core/4_0_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description
What you're asking for here is problematic because it involves an
initial wildcard on the date (which is not allowed), but you can do it
https://musicbrainz.org/search?query=begin%3A%2F.*%3F-01-.*%2F&type=artist&limit=25&method=advanced
... which is not exactly what you asked for, specifically that's artists
whose begin date's month is January, but I think that's what you meant
:)
Yes, the regular expression search does not really seem to be the exact
thing I expect since I am trying to get the results by querying a date
range. Anyway thanks for the information :)
Post by Ian McEwen
I believe the search does not properly handle dates without years, as
well. But hopefully that answers your question relatively
satisfactorily.
Post by Thanuditha Ruchiranga
Hi
I am trying to add some support for year agnostic entries like "artists
born between 1st of January and 1st of February" when browsing artists
under the born/founded sub category in the mockup
<http://musicbrainzexploremockup-ruchiranga.rhcloud.com/> I built. I
looked
Post by Thanuditha Ruchiranga
for a supported syntax for that and found no luck in finding any in the
links
https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2/Search
and
https://musicbrainz.org/doc/Search_Server.
Does the search server support that kind of queries? if so is there any
documentation i can refer to?
_______________________________________________
MusicBrainz-devel mailing list
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel
_______________________________________________
MusicBrainz-devel mailing list
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel
Thanks
Ruchiranga

Loading...