pylucene: my webapp django crash after first query pylucene query (version 9.1)

mm flag

This is messages that I get when I query many times pylucene (2 times).

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007fe2d913f03d, pid=3947943, tid=3948356

JRE version: OpenJDK Runtime Environment Temurin-17.0.5+8 (17.0.5+8) (build 17.0.5+8) Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (17.0.5+8, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64) Problematic frame: C [] JCCEnv::setClassPath(char const*)+0x2d

Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/bigissue/Documents/giustizia/lucene_queries/djangosite/giustiziasite/core.3947943)

An error report file with more information is saved as: /home/bigissue/Documents/giustizia/lucene_queries/djangosite/giustiziasite/hs_err_pid3947943.log

If you would like to submit a bug report, please visit:

My pylucene method

def thousand(self, startPagination, recPerPage):
        # specifica i campi da includere nel risultato
        columns = ["_id", "cf_giudice", "controparte", "codiceoggetto", "parte", "distretto"]
        # Avvia la macchina virtuale Java
        indexPath = File(self.LUCENE_FILES).toPath()
        directory =
        reader =
        searcher = IndexSearcher(reader)
        analyzer = StandardAnalyzer()
        queryParser = QueryParser("codiceoggetto", analyzer)
        coQuery1 = queryParser.parse("codiceoggetto:[140000 TO *]");
        andQuery = BooleanQuery.Builder()
        andQuery.add(BooleanClause(coQuery1, BooleanClause.Occur.MUST))
        andQuery =
        start =

        # esegui la query e ottieni il numero totale di documenti corrispondenti
        collector = TotalHitCountCollector(), collector)
        total = collector.getTotalHits()

        print("trovati: ", total)
        documents = {}
        if total > 0:
            # crea un oggetto MultiFieldSelector per selezionare i campi desiderati
            visitor = MultiFieldVisitor(columns)
            print("il visitor",visitor)
            keepScores = 0 #non mantiene gli score
            scoreCollector = TopScoreDocCollector.create(total,keepScores)
  , scoreCollector)
            scoreDocs = scoreCollector.topDocs(startPagination, recPerPage).scoreDocs

            duration = - start
            print("paginata ", str(duration))

            # stampa i documenti trovati
            for scoreDoc in scoreDocs:
                print("doc: ",scoreDoc.doc)
                #doc = searcher.doc(scoreDoc.doc, None, visitor, 0)
                # crea una nuova lista vuota
                fieldsList = javautil.ArrayList()

                # aggiungi ogni campo come elemento della nuova lista
                for field in columns:

                fieldsToLoad = javautil.HashSet(fieldsList)
                #fieldsToLoad = HashSet(columns)
                #doc = searcher.doc(scoreDoc.doc,columns)
                doc = searcher.doc(scoreDoc.doc, fieldsToLoad)

                print(doc.get("_id"), " ",
                    doc.get("cf_giudice"), " ",
                    doc.get("controparte"), " ",
                    doc.get("codiceoggetto"), " ",
                    doc.get("parte"), " ",
                fieldsDict = {}
                for field in doc.getFields():
                    fieldsDict[] = field.stringValue()

                documents[doc.get("_id")] = fieldsDict

        return documents
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.