You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Nicola Paganotti (Jira)" <ji...@apache.org> on 2022/11/01 15:46:00 UTC
[jira] [Commented] (SOLR-16514) lucene query: only QueryParser run well
[ https://issues.apache.org/jira/browse/SOLR-16514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17627217#comment-17627217 ]
Nicola Paganotti commented on SOLR-16514:
-----------------------------------------
I filled for Sole project because I'm looking for support about lucene ( solr Is based on lucene) and I haven't found a lucene project in Jira. I like jira software... Ok I accept his advise I will post in mailing list.
> lucene query: only QueryParser run well
> ---------------------------------------
>
> Key: SOLR-16514
> URL: https://issues.apache.org/jira/browse/SOLR-16514
> Project: Solr
> Issue Type: Task
> Security Level: Public(Default Security Level. Issues are Public)
> Components: clients - python
> Reporter: Nicola Paganotti
> Priority: Critical
> Labels: newbie
>
> {code:java}
> def searchGiustizia(self,startPagination,recPerPage):
> indexPath = File(self.fileLucene).toPath()
> directory = FSDirectory.open(indexPath)
> searcher = IndexSearcher(DirectoryReader.open(directory))
> paQuery5 = TermQuery(Term("parte","TELESI RICCARDO"))
> analyzer = StandardAnalyzer() print
> ("\n------------------------------------------------------")
> start = datetime.now()
> collector = TotalHitCountCollector()
> searcher.search(paQuery5, collector)
> print("found: ",collector.getTotalHits())
> duration = datetime.now() - start
> print("time ",str(duration))
> print ("\n------------------------------------------------------") {code}
> This function do a simple search in my Index of Apache Lucene. I use TermQuery but it return no results. If I use QueryParser, Lucene find me record with parte = "TELESI RICCARDO". Why doesn't TermQuery work?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org