[GitHub] [lucene] thecoop commented on pull request #11847: Add a method allowing canonical strings to be returned from DataInput
thecoop commented on PR #11847: URL: https://github.com/apache/lucene/pull/11847#issuecomment-1279930290 I am currently reviewing the impact of these changes on performance, GC, and memory usage to lucene & elasticsearch. If this does show an improvement, I'll set this PR to ready to review. If not, I'll close it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[GitHub] [lucene] uschindler commented on pull request #11840: GITHUB-11838 Add api to allow concurrent query rewrite
uschindler commented on PR #11840: URL: https://github.com/apache/lucene/pull/11840#issuecomment-1279954265 Hi @zhaih, the problem you describe is exactly why VirtualMethod is there. It allows to figure out which of both methods was overridden by a subclass at runtime. I can look into this next week. Actually it is long ago when we used VirtualMethod and there is currently no impementation actually using it. We used it mostly for Analysis when we did the big change from tokens to attributes and thats already 10 years ago. So I have to bring myself up to state, mainly because the whole thing is "not easy to understand" as there are various code paths that could be affected. To say it short: changing metjod signatures of protected methods where you have no chance to enforce downstream classes ne API are not easy. JDK avoids this, we have VirtualMethod :-) We should maybe only merge this to main branch for now and then work separately on backport. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[GitHub] [lucene] uschindler commented on pull request #11840: GITHUB-11838 Add api to allow concurrent query rewrite
uschindler commented on PR #11840: URL: https://github.com/apache/lucene/pull/11840#issuecomment-1279955134 > It seems to me it is a tool detecting whether there's difference in implementation, but still we are not able to avoid losing IndexSearcher once we've called a delegated method? Yes, basically all classes that delegate rewrite to downstream classes need to change to new API, so we still need to backport everything to 9.x and only detect cases where somebody uses the *old* api. Of course in the case that somebody writes a subclass that only implements the IndexReaer variant of rewrite you use the searcher. If this code then rewrites subqueries on its own it will call "rewrite(IndexReader)" and so it is subqueries won't use parallelization. This is not so dramatic as a new query in user's code will just never pass parallelization down its subqueries. Let me think a few evening about it :-) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[GitHub] [lucene] uschindler commented on a diff in pull request #11852: Luke Webapp
uschindler commented on code in PR #11852: URL: https://github.com/apache/lucene/pull/11852#discussion_r996473127 ## lucene/luke/src/java/org/apache/lucene/luke/app/web/LukeWebMain.java: ## @@ -17,31 +17,78 @@ package org.apache.lucene.luke.app.web; +import java.net.InetSocketAddress; import java.util.concurrent.CountDownLatch; +import java.util.HashMap; +import java.util.Map; import org.apache.lucene.luke.app.IndexHandler; import org.apache.lucene.luke.util.LoggerFactory; /** Entry class for web Luke */ -public class LukeWebMain { +public final class LukeWebMain { + + private LukeWebMain() { + } static { LoggerFactory.initGuiLogging(); } public static void main(String[] args) throws Exception { -String index = null; -if (args.length == 2 && args[0].equals("--index")) { - index = args[1]; -} else { - System.err.println("usage: LukeWebMain --index "); - Runtime.getRuntime().exit(1); +Map parsed = null; +try { + parsed = parseArgs(args); +} catch (Exception e) { + usage(e.getMessage()); } - IndexHandler indexHandler = IndexHandler.getInstance(); -indexHandler.open(index, "org.apache.lucene.store.FSDirectory", true, true, false); +indexHandler.open(getIndex(parsed), "org.apache.lucene.store.FSDirectory", true, true, false); CountDownLatch tombstone = new CountDownLatch(1); -HttpService httpService = new HttpService(indexHandler, tombstone); +HttpService httpService = new HttpService(getSockAddr(parsed), indexHandler, tombstone); httpService.start(); tombstone.await(); } + + private static String getIndex(Map args) { +String index = (String) args.get("index"); +if (index == null) { + usage("index arg is required"); +} +return index; + } + + private static InetSocketAddress getSockAddr(Map args) { +String host = (String) args.get("host"); +int port = (Integer) args.getOrDefault("port", 8080); +if (host == null) { + return new InetSocketAddress(port); Review Comment: Just set the default to "::1" (IPv6 localhost). If somebody has a broken configured system heshe can always set a cutsom ip address. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org