Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C974CE4AD for ; Sat, 9 Mar 2013 00:17:21 +0000 (UTC) Received: (qmail 88567 invoked by uid 500); 9 Mar 2013 00:17:18 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 88494 invoked by uid 500); 9 Mar 2013 00:17:18 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 88486 invoked by uid 99); 9 Mar 2013 00:17:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Mar 2013 00:17:18 +0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.217.180] (HELO mail-lb0-f180.google.com) (209.85.217.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Mar 2013 00:17:14 +0000 Received: by mail-lb0-f180.google.com with SMTP id q12so1751612lbc.39 for ; Fri, 08 Mar 2013 16:16:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=H+VK9aGlg5SVMm+nOxdgFsPWicc7/LAn2K/vDsKKBqs=; b=ZP91QlYbikL6jQACTiPISFYobsuxsdrxnJswLmHNImnOEDaoY472iVzOEV0rYbdUP2 IMcYumLCnXVrEdnvIrwfLPmwzcjwbo3wA9i0ZdjNAtWLyVjJ1NwueABGv6Bpoh2MeEwm UgIVyetpegX4ZHW5xWC5prBjLVw93QLskq6VdnKlxetg/xfvNpo3Q65ciAjjLtxtHDPO N8MZMPJxIz5xhMAgjOlegJ3eDXM1VhL5Qy0IbBfDqOwaXlEDFQ4B/K/sqwYt+RLh+W5m oxESfGIJg8H3OfdeRkApCqbMw3OsUYQBsjhLV6PI39N6crKsihk5wr5UW1aUZeYV/p6s j1GA== X-Received: by 10.152.102.177 with SMTP id fp17mr3721606lab.0.1362788211631; Fri, 08 Mar 2013 16:16:51 -0800 (PST) Received: from [10.0.0.8] (s42-00205.dsl.no.powertech.net. [77.40.130.205]) by mx.google.com with ESMTPS id xw14sm3375662lab.6.2013.03.08.16.16.49 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Mar 2013 16:16:50 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Search a folder with File name and retrieve all the files matched From: =?iso-8859-1?Q?Jan_H=F8ydahl?= In-Reply-To: Date: Sat, 9 Mar 2013 01:16:47 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <46905BE9-A830-45DC-B546-44CD7123DC38@cominvent.com> References: <1362688759976-4045629.post@n3.nabble.com> To: solr-user@lucene.apache.org X-Mailer: Apple Mail (2.1499) X-Gm-Message-State: ALoCoQml9LhywksJCwgPAn5dyUpLWSigOCvYWhGAnn/FY6N+RFK+d4Xz+4MaMx3PKJHYGRJsYvRQ X-Virus-Checked: Checked by ClamAV on apache.org Since this is a POC you could simply run this command with the default = example schema: cd solr/example/exampledocs java -Dauto -Drecursive=3D0 -jar post.jar path/to/folder You will get the full file name with path in field "resourcename" If you need to search just the filename, you can achieve that through = adding a new field "filename" with a copyField resourcename->filename = and a custom fieldType for filename with a PatternReplaceFilterFactory = to remove the path. -- Jan H=F8ydahl, search solution architect Cominvent AS - www.cominvent.com Solr Training - www.solrtraining.com 7. mars 2013 kl. 22:11 skrev Alexandre Rafalovitch : > You could use DataImportHandler with FileListEntityProcessor to get = the > file names in: > http://wiki.apache.org/solr/DataImportHandler#FileListEntityProcessor >=20 > Then, if it is recursive enumeration and not just one level, you = probably > want a tokenizer that splits on path separator characters (e.g. /). Or > maybe you want to index filename as a separate field from full path = (can do > it in FileListEntityProcessor itself). >=20 > And if you combined the list of files with inner entity using Tika, = you can > load the file content for searching as well: > http://wiki.apache.org/solr/DataImportHandler#Tika_Integration >=20 > Regards, > Alex. >=20 > Personal blog: http://blog.outerthoughts.com/ > LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch > - Time is the quality of nature that keeps events from happening all = at > once. Lately, it doesn't seem to be working. (Anonymous - via GTD = book) >=20 >=20 > On Thu, Mar 7, 2013 at 3:39 PM, pavangolla = wrote: >=20 >> HI, >> I am new to apache solr, >>=20 >> I am doing a poc, where there is a folder (in sys or some repository) = which >> has different files with diff extensions pdf, doc, xls.., >>=20 >> I want to search with a file name and retrieve all the files with the = name >> matching >>=20 >> How do i proceed on this. >>=20 >> Please help me on this. >>=20 >>=20 >>=20 >> -- >> View this message in context: >> = http://lucene.472066.n3.nabble.com/Search-a-folder-with-File-name-and-retr= ieve-all-the-files-matched-tp4045629.html >> Sent from the Solr - User mailing list archive at Nabble.com. >>=20