[GitHub] [lucene] rmuir commented on a diff in pull request #11852: Luke Webapp
rmuir commented on code in PR #11852: URL: https://github.com/apache/lucene/pull/11852#discussion_r996313951 ## 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: Well, I am not sure we want the security hassles... I guess if u want to do this, fine, but we'll just require the security to be on the level before merging. Seems easier to restrict to localhost to avoid this shit and save us the trouble. -- 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] rmuir commented on a diff in pull request #11852: Luke Webapp
rmuir commented on code in PR #11852: URL: https://github.com/apache/lucene/pull/11852#discussion_r996323874 ## 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: i urge you again to reconsider this. java code has no business listening to an actual network. practically ill block this PR on security if we want to press the matter, it will never be good enough for me :) -- 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] rmuir merged pull request #11850: Fix ExitableDirectoryReader sampling constants to be power-of-2
rmuir merged PR #11850: URL: https://github.com/apache/lucene/pull/11850 -- 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] rmuir closed issue #11848: Fix ExitableDirectoryReader sampling constants to be power-of-2
rmuir closed issue #11848: Fix ExitableDirectoryReader sampling constants to be power-of-2 URL: https://github.com/apache/lucene/issues/11848 -- 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] zhaih commented on pull request #11840: GITHUB-11838 Add api to allow concurrent query rewrite
zhaih commented on PR #11840: URL: https://github.com/apache/lucene/pull/11840#issuecomment-1279777375 Yeah I already made this one only on Lucene 10, I'll make a 9x PR according to Adrien's suggestion, it sounds not too complicated. (Thanks Uwe as well, good to know that we have a `VirtualMethod` class just for the back compatibility) -- 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] zhaih commented on pull request #11840: GITHUB-11838 Add api to allow concurrent query rewrite
zhaih commented on PR #11840: URL: https://github.com/apache/lucene/pull/11840#issuecomment-1279787336 I tried created one but then realized it seems not working, because query rewriting are rewriting query from top of the tree to the bottom so once we delegate to `rewrite(IndexReader)` we're not able to call the indexSearcher one in the children. I wonder if people are ok with this only happens after Lucene 10? Or @uschindler can you help evaluate using `VirtualMethod`? 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? -- 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] zacharymorn commented on pull request #1039: LUCENE-10635: Ensure test coverage for WANDScorer by using a test query
zacharymorn commented on PR #1039: URL: https://github.com/apache/lucene/pull/1039#issuecomment-1279818045 > I just realized this PR had got off my radar. Feel free to merge, I don't want to delay improvements to testing. No problem @jpountz and thanks for the approval! Will merge it in a bit. -- 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] zacharymorn merged pull request #1039: LUCENE-10635: Ensure test coverage for WANDScorer by using a test query
zacharymorn merged PR #1039: URL: https://github.com/apache/lucene/pull/1039 -- 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] zacharymorn opened a new pull request, #11854: LUCENE-10635: Ensure test coverage for WANDScorer by using a test query (Backporting)
zacharymorn opened a new pull request, #11854: URL: https://github.com/apache/lucene/pull/11854 Backporting PR https://github.com/apache/lucene/pull/1039 -- 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] zacharymorn merged pull request #11854: LUCENE-10635: Ensure test coverage for WANDScorer by using a test query (Backporting)
zacharymorn merged PR #11854: URL: https://github.com/apache/lucene/pull/11854 -- 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] zacharymorn closed issue #11671: Ensure test coverage for WANDScorer after additional scorers get added [LUCENE-10635]
zacharymorn closed issue #11671: Ensure test coverage for WANDScorer after additional scorers get added [LUCENE-10635] URL: https://github.com/apache/lucene/issues/11671 -- 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] janhoy opened a new pull request, #11855: ReleaseWizard - Upgrade 'consolemenu' dependency to v0.7.1
janhoy opened a new pull request, #11855: URL: https://github.com/apache/lucene/pull/11855 Ported from https://github.com/apache/solr/pull/1020 Mostly this upgrades console-menu so we can get rid of custom extensions which are now upstreamed. Also pin python versions in requirements.txt to avoid unexpected incompatibilties in the future. -- 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