Return-Path: X-Original-To: apmail-archiva-dev-archive@www.apache.org Delivered-To: apmail-archiva-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5437017232 for ; Wed, 5 Nov 2014 22:43:05 +0000 (UTC) Received: (qmail 29540 invoked by uid 500); 5 Nov 2014 22:43:05 -0000 Delivered-To: apmail-archiva-dev-archive@archiva.apache.org Received: (qmail 29492 invoked by uid 500); 5 Nov 2014 22:43:05 -0000 Mailing-List: contact dev-help@archiva.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@archiva.apache.org Delivered-To: mailing list dev@archiva.apache.org Received: (qmail 29476 invoked by uid 99); 5 Nov 2014 22:43:05 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Nov 2014 22:43:05 +0000 Received: from localhost (HELO mail-lb0-f176.google.com) (127.0.0.1) (smtp-auth username olamy, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Nov 2014 22:43:04 +0000 Received: by mail-lb0-f176.google.com with SMTP id 10so1493316lbg.21 for ; Wed, 05 Nov 2014 14:43:03 -0800 (PST) X-Received: by 10.112.93.231 with SMTP id cx7mr254159lbb.89.1415227383160; Wed, 05 Nov 2014 14:43:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.64.203 with HTTP; Wed, 5 Nov 2014 14:42:43 -0800 (PST) In-Reply-To: References: From: Olivier Lamy Date: Thu, 6 Nov 2014 09:42:43 +1100 Message-ID: Subject: Re: Searching pom elements and generic metadata To: dev@archiva.apache.org Content-Type: text/plain; charset=UTF-8 Hi, I would make repositoryId as a query param so will make it optional. If empty/null use the users repositories? On 6 November 2014 06:22, Carlos Sanchez wrote: > Thanks, got an initial implementation of getArtifactsByMetadata at > https://github.com/carlossg/archiva/compare/metadata-search > > I added the repositoryId param, like other methods, but I'm not sure if > that would be limiting the feature, searching in all repos would be more > interesting. > > On Wed, Nov 5, 2014 at 12:28 PM, Olivier Lamy wrote: > >> basic Cassandra requests tru Hector client won't work. >> You will have to write some manual cql queries. >> >> On 5 November 2014 22:07, Carlos Sanchez wrote: >> > On Wed, Nov 5, 2014 at 11:54 AM, Olivier Lamy wrote: >> > >> >> I would add that in the interface MetadataRepository, add a test in >> >> the tck and implements it for all providers :-) >> >> Maybe having 2 methods: >> >> * generic metadata: getArtifactsByMetadata( key, value) ( maybe a Map >> >> for multiple value pair? will you test the full value or a matching?) >> >> >> > >> > is the matching syntax for cassandra an jcr different? >> > I mean if I pass ('foo', 'bar*') -or some sort of regex- to do matching >> is >> > it going to work only in jcr? >> > >> > >> > >> >> * pom contents: getArtifactsByProperty( key, value ) ( same questions ) >> >> >> >> To start I won't go with a Map and exact matching :-) (I reckon pom >> >> content can be a pain with Cassandra impl) >> >> >> >> WDYT? >> >> >> >> Olivier >> >> >> >> >> >> On 5 November 2014 21:45, Carlos Sanchez wrote: >> >> > Thanks for the pointers, so if I add a method to JcrMetadataRepository >> >> > >> >> > getArtifactsByProperty(key, value) >> >> > >> >> > similar to getArtifactsByDateRange, writing the correct JCR query, I >> >> could >> >> > access all that metadata? >> >> > >> >> > >> >> > In which of the rest services would it make sense to add such a >> search? >> >> > >> >> > >> >> > >> >> > On Wed, Nov 5, 2014 at 11:28 AM, Olivier Lamy >> wrote: >> >> > >> >> >> Hi, >> >> >> The current SearchService search in maven indexer available datas. >> >> >> All the data you want to search are not available here but in the >> >> >> MetadataRepository ( so jcr, file or the new Cassandra). >> >> >> And currently there is no search methods for that! >> >> >> So really good news to see you as a volunteer to implement this! :-) >> >> >> Let me know if you need any pointers. >> >> >> >> >> >> Cheers >> >> >> Olivier >> >> >> >> >> >> >> >> >> On 4 November 2014 06:33, Carlos Sanchez wrote: >> >> >> > Hi, >> >> >> > >> >> >> > Two things I wasn't able to do and was going to implement (unless I >> >> >> missed >> >> >> > something): >> >> >> > >> >> >> > * search for generic metadata >> >> >> > * search for pom contents >> >> >> > >> >> >> > The way the search queries are built in SearchService only looks >> for >> >> the >> >> >> > typical fields (artifactId, groupId,...), so that needs to be >> changed, >> >> >> but >> >> >> > I don't know if the pom and generic metadata fields are even >> indexed, >> >> any >> >> >> > pointers? >> >> >> > >> >> >> > Looking to be able to search for "myMetadata:myValue" and something >> >> like >> >> >> > "developer:carlos*" through the rest api and ui. >> >> >> > >> >> >> > Thanks >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> Olivier Lamy >> >> >> http://twitter.com/olamy | http://linkedin.com/in/olamy >> >> >> >> >> >> >> >> >> >> >> -- >> >> Olivier Lamy >> >> http://twitter.com/olamy | http://linkedin.com/in/olamy >> >> >> >> >> >> -- >> Olivier Lamy >> http://twitter.com/olamy | http://linkedin.com/in/olamy >> -- Olivier Lamy http://twitter.com/olamy | http://linkedin.com/in/olamy